Skip to content

Commit 64966e3

Browse files
Merge pull request #107 from sbesson/gh_release
Add GitHub release creation to Maven workflow
2 parents 330aaff + 399c714 commit 64966e3

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/maven.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111

1212
jobs:
1313
build:
14+
permissions:
15+
contents: read
1416
strategy:
1517
matrix:
1618
java: [8, 11, 17, 21]
@@ -28,3 +30,15 @@ jobs:
2830
cache: 'maven'
2931
- name: Build
3032
run: mvn ${{ env.maven_commands }}
33+
release:
34+
permissions:
35+
contents: write
36+
needs: build
37+
if: startsWith(github.ref, 'refs/tags')
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Create a GitHub release
42+
run: gh release create --generate-notes "${GITHUB_REF#refs/tags/}"
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)