-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (57 loc) · 1.88 KB
/
native-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
name: Native build test
on:
workflow_dispatch:
jobs:
# Build native executable per runner
package:
name: 'Build with Graal on ${{ matrix.os }}'
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, macOS-latest, macos-14 ]
runs-on: ${{ matrix.os }}
steps:
- name: 'Check out repository'
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: 'Build project'
run: mvn install -DskipTests
- name: 'Build Native Image'
run: |
pushd server
mvn -ntp -B --file pom.xml -Pnative package -DskipTests
popd
- name: 'Create distribution'
run: |
pushd server
mvn -ntp -B --file pom.xml -Pdist package -DskipTests
popd
- name: 'Upload build artifact'
uses: actions/upload-artifact@v4
with:
name: power-server-${{ runner.os }}-${{ runner.arch }}
path: server/target/distributions/*.tar.gz
# checkout will clobber downloaded artifacts
# we have to download them again
- name: 'Download all build artifacts'
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: power-server-*
merge-multiple: true
- name: 'Release with JReleaser'
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ls -la artifacts
mvn -ntp -B --file server/pom.xml -Prelease -DartifactsDir=artifacts jreleaser:full-release -Djreleaser.dry.run=true -Djreleaser.select.current.platform