Skip to content

Commit 31ef43b

Browse files
authored
Add GitHub Action to build and release JAR
1 parent a16715c commit 31ef43b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build and Release JAR
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Java
17+
uses: actions/setup-java@v3
18+
with:
19+
distribution: 'temurin'
20+
java-version: '21'
21+
22+
- name: Build with Maven
23+
run: mvn clean package
24+
25+
- name: Upload JAR to GitHub Release
26+
uses: softprops/action-gh-release@v1
27+
with:
28+
files: target/*.jar
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)