Skip to content

Commit 4ebfd68

Browse files
Merge pull request #293 from sbesson/gh_release_create
CI: add step to create GitHub release on tag
2 parents eb7f2ad + 5e8c384 commit 4ebfd68

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99

1010
jobs:
1111
build:
12+
permissions:
13+
contents: read
1214
strategy:
1315
matrix:
1416
java: [8, 11, 17, 21]
@@ -42,3 +44,21 @@ jobs:
4244
if: github.event_name != 'pull_request' && matrix.java == 11
4345
run: |
4446
./gradlew -PArtifactoryUserName=${ArtifactoryUserName} -PArtifactoryPassword=${ArtifactoryPassword} publish
47+
release:
48+
permissions:
49+
contents: write
50+
if: startsWith(github.ref, 'refs/tags')
51+
needs: build
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
- name: Download artifacts from build
56+
uses: actions/download-artifact@v4
57+
with:
58+
name: bioformats2raw 11
59+
- name: List artifacts
60+
run: ls -R
61+
- name: Create a GitHub release
62+
run: gh release create --generate-notes "${GITHUB_REF#refs/tags/}" bioformats2raw-*
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)