Skip to content

Commit a43244b

Browse files
committed
ci(release): Publish GitHub Release on version tag
1 parent 56f5871 commit a43244b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,24 @@ jobs:
4141
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
4242
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
4343
run: ${{ env.MAVEN_COMMAND }} ${{ env.MAVEN_CLI_COMMON }} deploy -Prelease -DskipTests -Darchetype.test.skip=true
44+
45+
# Publish a GitHub Release for the tag once the Central deploy succeeds. Notes are
46+
# auto-generated by the GitHub Release Notes API from merged PRs/commits since the
47+
# previous tag. Isolated from the deploy job so contents:write is not granted while
48+
# GPG keys and Central credentials are in scope.
49+
github-release:
50+
needs: release
51+
runs-on: ubuntu-latest
52+
timeout-minutes: 10
53+
permissions:
54+
contents: write # required to create the GitHub Release
55+
steps:
56+
- name: Create GitHub Release
57+
env:
58+
GH_TOKEN: ${{ github.token }}
59+
run: >
60+
gh release create "${{ github.ref_name }}"
61+
--repo "${{ github.repository }}"
62+
--title "${{ github.ref_name }}"
63+
--generate-notes
64+
--verify-tag

0 commit comments

Comments
 (0)