-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (45 loc) · 1.35 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
name: release
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 安装 NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r26
add-to-path: false
local-cache: true
- name: 安装 Go
uses: actions/[email protected]
with:
go-version: 1.21.2
- name: 克隆 Tailscale
run: |
git clone https://github.com/tailscale/tailscale
- name: 编译 Tailscale
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
cd tailscale
go install tailscale.com/cmd/tailscale{,d}
CC=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang
CC=${CC} GOARCH=arm64 GOOS=android ./build_dist.sh tailscale.com/cmd/tailscale
CC=${CC} GOARCH=arm64 GOOS=android ./build_dist.sh tailscale.com/cmd/tailscaled
cp tailscale tailscaled ../bin
- name: 清理
run: |
rm -rf tailscale
- name: Run build.sh
run: sh build.sh
- name: Upload release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
files: tailscale_v*.zip
generate_release_notes: true