Skip to content

Commit

Permalink
ci: workflow updates to publish artefacts to GitHub packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jponge committed May 10, 2023
1 parent c403fba commit 575cee4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/deploy-maven-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy Maven artefacts on release
on:
# Automated when a release publication completes
release:
types: [created]
# Allow a manual run for a pre-existing tag (not the main intended usage)
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Publish package
run: ./mvnw --no-transfer-progress --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/pr-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ jobs:
name: Pull request check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
name: Checkout from Git
with:
fetch-depth: 0
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
name: Setup Java
with:
distribution: temurin
java-version: 11
distribution: 'temurin'
java-version: '11'
cache: maven
- name: Run tests
run: ./mvnw --no-transfer-progress verify
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
<module>jboss-cert-helper</module>
</modules>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub RedHatInsights Apache Maven Packages</name>
<url>https://maven.pkg.github.com/RedHatInsights/insights-java-client</url>
</repository>
</distributionManagement>

<properties>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>11</maven.compiler.source>
Expand Down

0 comments on commit 575cee4

Please sign in to comment.