build for magisk module #1
This file contains hidden or 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: Build for Magisk Tailscaled | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main ] | |
| tags: [ v* ] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Go 1.24.x | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.x' | |
| - run: go version | |
| - name: Install Android NDK | |
| id: setup-ndk | |
| uses: nttld/setup-ndk@v1 | |
| with: | |
| ndk-version: r27c | |
| add-to-path: false | |
| local-cache: true | |
| - name: Build arm | |
| run: | | |
| export ANDROID_NDK_PATH="${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin" | |
| ./build_android.sh arm | |
| - name: Build arm64 | |
| run: | | |
| export ANDROID_NDK_PATH="${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin" | |
| ./build_android.sh arm64 | |
| - name: Install UPX | |
| uses: crazy-max/ghaction-upx@v3 | |
| with: | |
| install-only: true | |
| - name: Compress binaries with UPX | |
| run: | | |
| upx --lzma --best ./dist/tailscale.combined.arm | |
| upx --lzma --best ./dist/tailscale.combined.arm64 | |
| - name: Compress artifacts | |
| run: | | |
| eval "$(./build_dist.sh shellvars)" | |
| tar -czf dist/tailscale.combined.arm64.${VERSION_SHORT}.tar.gz -C dist --transform='s/tailscale.combined.arm64/tailscale.combined/' tailscale.combined.arm64 | |
| tar -czf dist/tailscale.combined.arm.${VERSION_SHORT}.tar.gz -C dist --transform='s/tailscale.combined.arm/tailscale.combined/' tailscale.combined.arm | |
| rm -f dist/tailscale.combined.arm64 | |
| rm -f dist/tailscale.combined.arm | |
| ls -lh dist | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tailscale-combined | |
| path: | | |
| dist/*.tar.gz |