fix tailscaled.state save #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: push | |
on: | |
workflow_dispatch: | |
push: | |
paths-ignore: | |
- ".github" | |
- "README.md" | |
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: 打包 Magisk 模块 | |
run: sh build.sh | |
- name: 上传 tailscale | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tailscale_binrary | |
path: | | |
bin/tailscale | |
bin/tailscaled | |
- name: 上传模块 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Tailscale4Magisk | |
path: | | |
tailscale_*.zip | |
README.md |