From a5bb39ac8a8991dc20ee3b0d6d922b4a3a762a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E6=89=87=E6=BB=91=E7=BF=94=E7=BF=BC?= Date: Sun, 23 Jul 2023 11:16:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E6=89=8B=E5=8A=A8=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E7=BC=96=E8=AF=91=E6=97=B6=E7=9A=84Xray=20core?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and update sth --- .github/workflows/build.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07db6e26..a49c0d39 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,11 @@ name: Build APK on: push: workflow_dispatch: + inputs: + XRAY_CORE_VERSION: + description: 'Xray core version or commit hash' + required: false + jobs: build: @@ -10,20 +15,16 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: '17' - - name: test - run: | - java --version - - name: Setup Golang - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: '1.19.11' @@ -52,6 +53,7 @@ jobs: cd ${{ github.workspace }}/build git clone --depth=1 -b main https://github.com/2dust/AndroidLibXrayLite.git cd AndroidLibXrayLite + go get github.com/xtls/xray-core@${{ github.event.inputs.XRAY_CORE_VERSION }} || true gomobile init go mod tidy -v gomobile bind -v -androidapi 19 -ldflags='-s -w' ./ @@ -65,7 +67,7 @@ jobs: ./gradlew assembleDebug - name: Upload APK - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: apk path: ${{ github.workspace }}/V2rayNG/app/build/outputs/apk/dev/debug/ \ No newline at end of file