Skip to content

Commit 41a60dd

Browse files
committed
Add GitHub Actions: auto build on push, attach JAR on release
1 parent cbe35d2 commit 41a60dd

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build & Release
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
release:
9+
types: [ published ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Java 21
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '21'
21+
distribution: 'temurin'
22+
cache: 'maven'
23+
24+
- name: Build with Maven
25+
run: mvn package -q
26+
27+
- name: Upload artifact
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: SeedShield
31+
path: target/SeedShield-*.jar
32+
33+
- name: Upload JAR to Release
34+
if: github.event_name == 'release'
35+
uses: softprops/action-gh-release@v2
36+
with:
37+
files: target/SeedShield-*.jar

0 commit comments

Comments
 (0)