Skip to content

Commit dea0ea5

Browse files
committed
Try to ignore non-zero result
1 parent 795da64 commit dea0ea5

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/maven-publish-linux.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
env:
2828
GITHUB_TOKEN: ${{ github.token }}
2929

30+
# this is nasty! the publish fails as the pom already exists but we only really want to artefact published, so we try to ignore the error
31+
# this is also why the full build is performed in the previous step as we do want that to fail if there are other errors in the build
3032
- name: Publish to GitHub Packages Apache Maven
3133
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml || echo "Ignoring non-zero result"
3234
env:

.github/workflows/maven-publish-windows.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ jobs:
2525
- name: Build with Maven
2626
run: mvn install -s ${{ github.workspace }}\settings.xml --file pom.xml
2727

28+
# this is nasty! the publish fails as the pom already exists but we only really want to artefact published, so we try to ignore the error
29+
# this is also why the full build is performed in the previous step as we do want that to fail if there are other errors in the build
2830
- name: Publish to GitHub Packages Apache Maven
29-
run: mvn deploy -s ${{ github.workspace }}\settings.xml --file pom.xml || echo "Ignoring non-zero result" || exit 0
31+
run: mvn deploy -s ${{ github.workspace }}\settings.xml --file pom.xml || echo "Ignoring non-zero result" & exit 0
3032
env:
3133
GITHUB_TOKEN: ${{ github.token }}
3234

0 commit comments

Comments
 (0)