-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (43 loc) · 1.38 KB
/
build-android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build for Android
on:
workflow_dispatch:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Git LFS
run: |
git lfs install
git lfs pull
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.21.4' # Specify the Go version
- name: Install and Initialize gomobile
run: |
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Install gomobile
run: go get golang.org/x/mobile/bind@latest
- name: Build mobile package
run: |
gomobile bind -v -o ./build/mobile.aar -target=android -androidapi 26 ./mobile
- name: Set up Maven
uses: actions/setup-java@v1
with:
java-version: '11' # Specify the Java version
distribution: 'adopt'
- name: Install package with Maven
run: |
FILE="-Dfile=./build/mobile.aar"
mvn install:install-file $FILE -DgroupId=land.fx -DartifactId=fulamobile -Dversion=${{ github.event.release.tag_name }} -Dpackaging=aar -DgeneratePom=true
- name: Deploy to GitHub Packages
run: |
mvn deploy -Drelease_version=${{ github.event.release.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}