-
Notifications
You must be signed in to change notification settings - Fork 8
92 lines (87 loc) · 2.56 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
84
85
86
87
88
89
90
91
92
name: build and release and upload assets
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
make-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
build-jar:
runs-on: ubuntu-latest
needs:
- make-release
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'sbt'
- run: sbt assembly
- run: mv target/scala-2.13/cliche-assembly*.jar cliche.jar
- uses: actions/upload-artifact@v3
with:
path: cliche.jar
name: cliche.jar
- uses: AButler/[email protected]
with:
files: cliche.jar
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}
build-linux-native-image:
runs-on: ubuntu-latest
needs:
- make-release
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'sbt'
- run: GRAALVM_HOME=$GRAALVM_11_ROOT sbt nativeImage
- uses: actions/upload-artifact@v3
with:
path: target/native-image/cliche
name: cliche-linux.bin
- run: mv target/native-image/cliche ./
- run: tar -czf cliche-linux.bin.tar.gz cliche
- uses: AButler/[email protected]
with:
files: cliche-linux.bin.tar.gz
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}
build-mac-native-image:
runs-on: macos-latest
needs:
- make-release
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'sbt'
- run: $GRAALVM_11_ROOT/gu install native-image
- run: GRAALVM_HOME=$GRAALVM_11_ROOT/../ sbt nativeImage
- uses: actions/upload-artifact@v3
with:
path: target/native-image/cliche
name: cliche-macos.bin
- run: mv target/native-image/cliche ./
- run: tar -czf cliche-macos.bin.tar.gz cliche
- uses: AButler/[email protected]
with:
files: cliche-macos.bin.tar.gz
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}