Skip to content

Commit 2c23b7e

Browse files
committed
Add release workflow
1 parent ccaa218 commit 2c23b7e

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Set up JDK
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: temurin
23+
java-version: "21"
24+
25+
- name: Set up Gradle
26+
uses: gradle/actions/setup-gradle@v4
27+
28+
- name: Make Gradle wrapper executable
29+
run: chmod +x ./gradlew
30+
31+
- name: Build
32+
run: ./gradlew build --no-daemon
33+
34+
- name: Capture build artifacts
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: Artifacts
38+
path: build/libs/
39+
40+
- name: Create Release
41+
if: startsWith(github.ref, 'refs/tags/')
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: |
45+
gh release create "${GITHUB_REF_NAME}" \
46+
--generate-notes \
47+
build/libs/*

0 commit comments

Comments
 (0)