2024-04-16 13:26:48 +09:00
|
|
|
name: release
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
- default
|
|
|
|
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: Build on Push Tag 🚀
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Checkout Code
|
|
|
|
id: checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup Build Tools
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y gcc make
|
|
|
|
|
|
|
|
- name: Setup NDK
|
|
|
|
uses: nttld/setup-ndk@v1
|
|
|
|
id: setup-ndk
|
|
|
|
with:
|
|
|
|
ndk-version: r26d
|
2024-04-16 13:34:53 +09:00
|
|
|
local-cache: true
|
2024-04-16 13:53:30 +09:00
|
|
|
|
2024-04-16 13:26:48 +09:00
|
|
|
- name: Setup Go Environment
|
|
|
|
uses: actions/setup-go@master
|
|
|
|
|
|
|
|
- name: Cache Downloaded Modules
|
|
|
|
uses: actions/cache@master
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/go-build
|
|
|
|
~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ matrix.goos }}-${{ matrix.goarch }}-${{ hashFiles('**/go.sum') }}
|
|
|
|
|
|
|
|
- name: Build Libraries
|
|
|
|
env:
|
|
|
|
NDK_TOOLCHAIN: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
|
|
BUILD_MACHINE: linux
|
2024-04-16 13:47:44 +09:00
|
|
|
run: |
|
|
|
|
echo NDK path is $NDK_TOOLCHAIN
|
|
|
|
make -e
|
2024-04-16 13:26:48 +09:00
|
|
|
|
|
|
|
- name: Upload Binaries to Release
|
|
|
|
uses: svenstaro/upload-release-action@v2
|
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: build/*.gz
|
|
|
|
tag: ${{ github.ref }}
|
|
|
|
overwrite: true
|
|
|
|
file_glob: true
|