-
Notifications
You must be signed in to change notification settings - Fork 2
155 lines (128 loc) · 4.68 KB
/
release.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Release
on:
push:
tags:
- "*"
jobs:
builds-on-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
- run: |
rustup target add wasm32-unknown-unknown
rustup target add x86_64-pc-windows-msvc
make clean-app
make CARGO_FLAGS="--target x86_64-pc-windows-msvc"
install -d wasi-update
install bin/wasi-update* wasi-update/
7z a -mx=9 wasi-update_${{ github.ref_name }}_windows-x86_64.zip wasi-update
rustup target add aarch64-pc-windows-msvc
make clean-app
make CARGO_FLAGS="--target aarch64-pc-windows-msvc"
install -d wasi-update
install bin/wasi-update* wasi-update/
7z a -mx=9 wasi-update_${{ github.ref_name }}_windows-aarch64.zip wasi-update
- uses: actions/upload-artifact@v4
with:
name: wasi-update-win-x86_64
path: wasi-update_${{ github.ref_name }}_windows-x86_64.zip
- uses: actions/upload-artifact@v4
with:
name: wasi-update-win-aarch64
path: wasi-update_${{ github.ref_name }}_windows-aarch64.zip
build-on-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
- run: |
rustup target add aarch64-apple-darwin
make CARGO_FLAGS="--target aarch64-apple-darwin"
install -d wasi-update
install bin/wasi-update* wasi-update/
tar cjpf wasi-update_${{ github.ref_name }}_macos-aarch64.tar.bz2 wasi-update
- uses: actions/upload-artifact@v4
with:
name: wasi-update-macos-aarch64
path: wasi-update_${{ github.ref_name }}_macos-aarch64.tar.bz2
build-on-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install Zig
uses: mlugg/setup-zig@v1
with:
version: 0.12.0
- uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
- run: |
cargo install cargo-zigbuild
rustup target add wasm32-unknown-unknown
cargo install cargo-deb
make
( cd src && cargo deb --output=../wasi-update_${{ github.ref_name }}_amd64.deb --no-build )
rustup target add x86_64-unknown-linux-gnu
make clean-app
make CARGO_FLAGS="--target x86_64-unknown-linux-gnu"
install -d wasi-update
install bin/wasi-update* wasi-update/
tar cjpf wasi-update_${{ github.ref_name }}_linux-x86_64.tar.bz2 wasi-update
rustup target add aarch64-unknown-linux-gnu
make clean-app
make CARGO_FLAGS="--target aarch64-unknown-linux-gnu"
install -d wasi-update
install bin/wasi-update* wasi-update/
tar cjpf wasi-update_${{ github.ref_name }}_linux-aarch64.tar.bz2 wasi-update
rustup target add wasm32-wasi
make clean-app
make CARGO_FLAGS="--target wasm32-wasi"
install -d wasi-update
install bin/wasi-update* wasi-update/
tar cjpf wasi-update_${{ github.ref_name }}_wasm32-wasi.tar.bz2 wasi-update
- uses: actions/upload-artifact@v4
with:
name: wasi-update-linux-x86_64
path: wasi-update_${{ github.ref_name }}_linux-x86_64.tar.bz2
- uses: actions/upload-artifact@v4
with:
name: wasi-update-linux-aarch64
path: wasi-update_${{ github.ref_name }}_linux-aarch64.tar.bz2
- uses: actions/upload-artifact@v4
with:
name: wasi-update-wasm32-wasi
path: wasi-update_${{ github.ref_name }}_wasm32-wasi.tar.bz2
- uses: actions/upload-artifact@v4
with:
name: wasi-update-deb-linux-x86_64
path: wasi-update_${{ github.ref_name }}_amd64.deb
release:
needs:
- builds-on-windows
- build-on-macos
- build-on-linux
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ github.ref_name }}
draft: true
prerelease: false
files: |
wasi-update-deb-linux-x86_64/*.deb
wasi-update-linux-x86_64/*.tar.bz2
wasi-update-linux-aarch64/*.tar.bz2
wasi-update-wasm32-wasi/*.tar.bz2
wasi-update-macos-aarch64/*.tar.bz2
wasi-update-win-x86_64/*.zip
wasi-update-win-aarch64/*.zip