-
Notifications
You must be signed in to change notification settings - Fork 3
83 lines (73 loc) · 2.1 KB
/
build.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Wavelit builds
on:
push:
branches:
- '*'
- '!refs/tags/.*'
tags-ignore:
- '*'
jobs:
build:
name: Wavelit on ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: graalvm/setup-graalvm@v1
with:
version: '22.3.1'
java-version: '19'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Run tests
run: |
./gradlew test
- name: Build native
run: |
./gradlew app:nativeCompile
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: nativeCompile-${{ matrix.os }}
path: ./app/build/native/nativeCompile
release:
name: Release
if: "contains(github.event.head_commit.message, '[release]') && github.event.ref=='refs/heads/master'"
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download all build artifacts
uses: actions/download-artifact@v2
- name: Setup Java for JReleaser
uses: actions/setup-java@v3
with:
java-version: 19
distribution: 'adopt'
- name: Version
id: version
run: |
VERSION=$(cat ./VERSION)
echo "VERSION=$VERSION"
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Run JReleaser
uses: jreleaser/release-action@v2
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_PROJECT_VERSION: ${{ steps.version.outputs.VERSION }}
- name: JReleaser release output
if: always()
uses: actions/upload-artifact@v3
with:
name: jreleaser-release
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
...