允许手动指定编译时的Xray core版本

and update sth
This commit is contained in:
风扇滑翔翼
2023-07-23 11:16:06 +08:00
parent 073c7c0410
commit a5bb39ac8a

View File

@@ -3,6 +3,11 @@ name: Build APK
on: on:
push: push:
workflow_dispatch: workflow_dispatch:
inputs:
XRAY_CORE_VERSION:
description: 'Xray core version or commit hash'
required: false
jobs: jobs:
build: build:
@@ -10,20 +15,16 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Setup Java - name: Setup Java
uses: actions/setup-java@v2 uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '17' java-version: '17'
- name: test
run: |
java --version
- name: Setup Golang - name: Setup Golang
uses: actions/setup-go@v2 uses: actions/setup-go@v4
with: with:
go-version: '1.19.11' go-version: '1.19.11'
@@ -52,6 +53,7 @@ jobs:
cd ${{ github.workspace }}/build cd ${{ github.workspace }}/build
git clone --depth=1 -b main https://github.com/2dust/AndroidLibXrayLite.git git clone --depth=1 -b main https://github.com/2dust/AndroidLibXrayLite.git
cd AndroidLibXrayLite cd AndroidLibXrayLite
go get github.com/xtls/xray-core@${{ github.event.inputs.XRAY_CORE_VERSION }} || true
gomobile init gomobile init
go mod tidy -v go mod tidy -v
gomobile bind -v -androidapi 19 -ldflags='-s -w' ./ gomobile bind -v -androidapi 19 -ldflags='-s -w' ./
@@ -65,7 +67,7 @@ jobs:
./gradlew assembleDebug ./gradlew assembleDebug
- name: Upload APK - name: Upload APK
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: apk name: apk
path: ${{ github.workspace }}/V2rayNG/app/build/outputs/apk/dev/debug/ path: ${{ github.workspace }}/V2rayNG/app/build/outputs/apk/dev/debug/