mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
Create build_android
Signed-off-by: Ali Salimi <98024891+alisalimik@users.noreply.github.com>
This commit is contained in:
parent
28880453a2
commit
a178d32408
49
.github/workflows/build_android
vendored
Normal file
49
.github/workflows/build_android
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
name: Build GoMobile AAR
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and Upload AAR
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: '1.20' # Adjust to your Go version
|
||||||
|
|
||||||
|
- name: Set up Java
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'adopt'
|
||||||
|
java-version: '11'
|
||||||
|
|
||||||
|
- name: Install Android SDK
|
||||||
|
uses: android-actions/setup-android@v2
|
||||||
|
with:
|
||||||
|
api-level: 30
|
||||||
|
build-tools: 30.0.3
|
||||||
|
|
||||||
|
- name: Install GoMobile
|
||||||
|
run: |
|
||||||
|
go install golang.org/x/mobile/cmd/gomobile@latest
|
||||||
|
gomobile init
|
||||||
|
|
||||||
|
- name: Build AAR with GoMobile
|
||||||
|
run: gomobile bind -target=android -o mylib.aar ./path/to/mylib
|
||||||
|
|
||||||
|
- name: Upload AAR file
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: mylib-aar
|
||||||
|
path: mylib.aar
|
Loading…
x
Reference in New Issue
Block a user