Build #9
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: Build | |
on: | |
workflow_dispatch: | |
inputs: | |
release_tag: | |
required: true | |
type: string | |
description : 'Release tag' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Setup Android SDK Tools | |
uses: android-actions/[email protected] | |
with: | |
cmdline-tools-version: 10406996 | |
- name: Setup Android NDK | |
uses: nttld/[email protected] | |
with: | |
ndk-version: 'r26b' | |
link-to-sdk: true | |
- name: Setup Go Mobile | |
run: | | |
go install golang.org/x/mobile/cmd/gomobile@latest | |
export PATH=$PATH:~/go/bin | |
- name: Build | |
run: | | |
gomobile init | |
go mod tidy | |
cd pkg/socks | |
go get golang.org/x/mobile/bind | |
gomobile bind -v -androidapi 21 -ldflags='-s -w' ./ | |
- name: Upload AndroidLibSocksLite to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
file: ./libv2ray*r | |
tag: ${{ github.event.inputs.release_tag }} | |
file_glob: true |