Skip to content

Commit

Permalink
Run Maven rollback stage if repository closure fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ascopes committed Jul 22, 2024
1 parent 8e3f024 commit 72a2988
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ jobs:
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Abort and rollback staging release
if: ${{ failure() }}
run: |-
./mvnw -B -e \
-Dpassword='${{ secrets.GITHUB_TOKEN }}' \
-DreleaseVersion="${release_version}" \
-Dtag="v${release_version}" \
release:rollback
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Create GitHub Release
if: ${{ ! inputs.dry-run }}
uses: ncipollo/release-action@v1
Expand Down

0 comments on commit 72a2988

Please sign in to comment.