-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (89 loc) · 2.83 KB
/
Copy pathrelease.yml
File metadata and controls
108 lines (89 loc) · 2.83 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Build and Release
on:
push:
tags:
- "v*"
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: "21"
components: "native-image"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build native executable
run: ./gradlew nativeCompile
- name: Create release directory
run: |
mkdir -p klox-linux
cp build/native/nativeCompile/klox klox-linux/
cp README.md QUICKSTART.md FEATURES.md CUSTOM_FEATURES.md klox-linux/
chmod +x klox-linux/klox
- name: Create archive
run: tar -czf klox-linux-x64.tar.gz klox-linux/
- name: Upload to release
uses: softprops/action-gh-release@v1
with:
files: klox-linux-x64.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: "21"
components: "native-image"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build native executable
run: ./gradlew nativeCompile
- name: Create release directory
run: |
mkdir -p klox-macos
cp build/native/nativeCompile/klox klox-macos/
cp README.md QUICKSTART.md FEATURES.md CUSTOM_FEATURES.md klox-macos/
chmod +x klox-macos/klox
- name: Create archive
run: tar -czf klox-macos-arm64.tar.gz klox-macos/
- name: Upload to release
uses: softprops/action-gh-release@v1
with:
files: klox-macos-arm64.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: "21"
components: "native-image"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build native executable
run: .\gradlew.bat nativeCompile
- name: Create release directory
run: |
mkdir klox-windows
copy build\native\nativeCompile\klox.exe klox-windows\
copy README.md klox-windows\
copy QUICKSTART.md klox-windows\
copy FEATURES.md klox-windows\
copy CUSTOM_FEATURES.md klox-windows\
- name: Create archive
run: |
cd klox-windows
tar -czf ..\klox-windows-x64.tar.gz *
cd ..
- name: Upload to release
uses: softprops/action-gh-release@v1
with:
files: klox-windows-x64.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}