-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (33 loc) · 1013 Bytes
/
ci.yml
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
32
33
34
35
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: temurin
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build
run: ./gradlew build
- name: Package
uses: actions/upload-artifact@v4
with:
name: SevPatches-${{ github.sha }}
path: build/libs
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./build/libs/sevpatches-${{ github.event.release.tag_name }}-${{ github.run_number }}.jar
token: ${{ secrets.GITHUB_TOKEN }}