-
Notifications
You must be signed in to change notification settings - Fork 178
222 lines (218 loc) · 9.42 KB
/
release.yaml
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
name: Release
on:
workflow_dispatch:
push:
tags:
- '*'
env:
MUSL_SDK_URL: https://musl.cc
MUSL_SDK_X86_32: i486-linux-musl-cross.tgz
MUSL_SDK_X86_64: x86_64-linux-musl-cross.tgz
MUSL_SDK_ARM_32: arm-linux-musleabi-cross.tgz
MUSL_SDK_ARM_64: aarch64-linux-musl-cross.tgz
MUSL_SDK_MIPS_32: mips-linux-muslsf-cross.tgz
MUSL_SDK_MIPS_32_EL: mipsel-linux-muslsf-cross.tgz
MUSL_SDK_MIPS_64: mips64-linux-musl-cross.tgz
MUSL_SDK_MIPS_64_EL: mips64el-linux-musl-cross.tgz
MUSL_SDK_RISCV_32: riscv32-linux-musl-cross.tgz
MUSL_SDK_RISCV_64: riscv64-linux-musl-cross.tgz
jobs:
build:
name: Build and release
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: true
- name: Init
run: |
sudo apt -qq update
sudo apt -qq install -y wget git
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_X86_32 }}
tar xf ${{ env.MUSL_SDK_X86_32 }}
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_X86_64 }}
tar xf ${{ env.MUSL_SDK_X86_64 }}
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_ARM_32 }}
tar xf ${{ env.MUSL_SDK_ARM_32 }}
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_ARM_64 }}
tar xf ${{ env.MUSL_SDK_ARM_64 }}
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_MIPS_32 }}
tar xf ${{ env.MUSL_SDK_MIPS_32 }}
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_MIPS_32_EL }}
tar xf ${{ env.MUSL_SDK_MIPS_32_EL }}
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_MIPS_64 }}
tar xf ${{ env.MUSL_SDK_MIPS_64 }}
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_MIPS_64_EL }}
tar xf ${{ env.MUSL_SDK_MIPS_64_EL }}
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_RISCV_32 }}
tar xf ${{ env.MUSL_SDK_RISCV_32 }}
wget -q ${{ env.MUSL_SDK_URL }}/${{ env.MUSL_SDK_RISCV_64 }}
tar xf ${{ env.MUSL_SDK_RISCV_64 }}
- name: Gen Source
run: |
mkdir -p hev-socks5-tunnel-${{ github.ref_name }}
git ls-files --recurse-submodules | tar c -O -T- | tar x -C hev-socks5-tunnel-${{ github.ref_name }}
tar caf hev-socks5-tunnel-${{ github.ref_name }}.tar.gz hev-socks5-tunnel-${{ github.ref_name }}
- name: Build Linux
run: |
# x86_32
PREFIX=$(basename ${{ env.MUSL_SDK_X86_32 }} cross.tgz)
make clean
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j
cp bin/hev-socks5-tunnel hev-socks5-tunnel-linux-x86_32
# x86_64
PREFIX=$(basename ${{ env.MUSL_SDK_X86_64 }} cross.tgz)
make clean
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j
cp bin/hev-socks5-tunnel hev-socks5-tunnel-linux-x86_64
# arm32
PREFIX=$(basename ${{ env.MUSL_SDK_ARM_32 }} cross.tgz)
make clean
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j
cp bin/hev-socks5-tunnel hev-socks5-tunnel-linux-arm32
# arm64
PREFIX=$(basename ${{ env.MUSL_SDK_ARM_64 }} cross.tgz)
make clean
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j
cp bin/hev-socks5-tunnel hev-socks5-tunnel-linux-arm64
# mips32
PREFIX=$(basename ${{ env.MUSL_SDK_MIPS_32 }} cross.tgz)
make clean
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j
cp bin/hev-socks5-tunnel hev-socks5-tunnel-linux-mips32
# mips32el
PREFIX=$(basename ${{ env.MUSL_SDK_MIPS_32_EL }} cross.tgz)
make clean
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j
cp bin/hev-socks5-tunnel hev-socks5-tunnel-linux-mips32el
# mips64
PREFIX=$(basename ${{ env.MUSL_SDK_MIPS_64 }} cross.tgz)
make clean
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j
cp bin/hev-socks5-tunnel hev-socks5-tunnel-linux-mips64
# mips64el
PREFIX=$(basename ${{ env.MUSL_SDK_MIPS_64_EL }} cross.tgz)
make clean
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j
cp bin/hev-socks5-tunnel hev-socks5-tunnel-linux-mips64el
# riscv32
PREFIX=$(basename ${{ env.MUSL_SDK_RISCV_32 }} cross.tgz)
make clean
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j
cp bin/hev-socks5-tunnel hev-socks5-tunnel-linux-riscv32
# riscv64
PREFIX=$(basename ${{ env.MUSL_SDK_RISCV_64 }} cross.tgz)
make clean
make CROSS_PREFIX=$(pwd)/${PREFIX}cross/bin/${PREFIX} ENABLE_STATIC=1 -j
cp bin/hev-socks5-tunnel hev-socks5-tunnel-linux-riscv64
- name: Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
draft: false
prerelease: false
- name: Upload source
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hev-socks5-tunnel-${{ github.ref_name }}.tar.gz
asset_name: hev-socks5-tunnel-${{ github.ref_name }}.tar.gz
asset_content_type: application/octet-stream
- name: Upload linux-x86_32
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hev-socks5-tunnel-linux-x86_32
asset_name: hev-socks5-tunnel-linux-x86_32
asset_content_type: application/octet-stream
- name: Upload linux-x86_64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hev-socks5-tunnel-linux-x86_64
asset_name: hev-socks5-tunnel-linux-x86_64
asset_content_type: application/octet-stream
- name: Upload linux-arm32
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hev-socks5-tunnel-linux-arm32
asset_name: hev-socks5-tunnel-linux-arm32
asset_content_type: application/octet-stream
- name: Upload linux-arm64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hev-socks5-tunnel-linux-arm64
asset_name: hev-socks5-tunnel-linux-arm64
asset_content_type: application/octet-stream
- name: Upload linux-mips32
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hev-socks5-tunnel-linux-mips32
asset_name: hev-socks5-tunnel-linux-mips32
asset_content_type: application/octet-stream
- name: Upload linux-mips32el
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hev-socks5-tunnel-linux-mips32el
asset_name: hev-socks5-tunnel-linux-mips32el
asset_content_type: application/octet-stream
- name: Upload linux-mips64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hev-socks5-tunnel-linux-mips64
asset_name: hev-socks5-tunnel-linux-mips64
asset_content_type: application/octet-stream
- name: Upload linux-mips64el
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hev-socks5-tunnel-linux-mips64el
asset_name: hev-socks5-tunnel-linux-mips64el
asset_content_type: application/octet-stream
- name: Upload linux-riscv32
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hev-socks5-tunnel-linux-riscv32
asset_name: hev-socks5-tunnel-linux-riscv32
asset_content_type: application/octet-stream
- name: Upload linux-riscv64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hev-socks5-tunnel-linux-riscv64
asset_name: hev-socks5-tunnel-linux-riscv64
asset_content_type: application/octet-stream