-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (31 loc) · 850 Bytes
/
build.yml
File metadata and controls
31 lines (31 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Publish compiled jar to GitHub releases
on:
push:
branches: [ main ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Build JAR
run: mvn --batch-mode --update-snapshots verify
- name: Normalize JAR name
run: |
JAR=$(ls target/Idly-*.jar | head -n 1)
cp "$JAR" Idly.jar
- name: Create GitHub Release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
tag_name: Idly-${{ github.sha }}
name: Idly-${{ github.sha }}
files: Idly.jar