Skip to content

Commit

Permalink
fix: config for github package deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ariwk authored Dec 19, 2023
1 parent 0ac8afd commit 94a2422
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
name: maven-release
on:
push:
branches: [main]
branches: [main, feature/**, renovate/**]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17 for deploy to S3 bucket
Expand All @@ -14,7 +17,7 @@ jobs:
distribution: adopt
java-version: 17
cache: maven
- uses: whelk-io/maven-settings-xml-action@v20
- uses: whelk-io/maven-settings-xml-action@v21
with:
repositories: >
[
Expand Down Expand Up @@ -45,15 +48,16 @@ jobs:
[
"github"
]
- run: cat /home/runner/.m2/settings.xml
- name: Print settings.xml
run: cat /home/runner/.m2/settings.xml
- name: Build with Maven
run: mvn --batch-mode clean package
- name: Extract artefact version
id: artefact_version
run: echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
- name: Publish to S3 bucket
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }}
run: mvn --batch-mode deploy -Ps3Deploy
run: mvn --batch-mode deploy -Ps3Deploy
- name: Publish to GitHub Packages
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }}
run: mvn --batch-mode deploy -PgithubDeploy
Expand Down

0 comments on commit 94a2422

Please sign in to comment.