Dependencies #4
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: Dependencies | |
on: | |
workflow_dispatch: | |
inputs: | |
CORE: | |
description: 'versi of the Xray-core' | |
required: true | |
default: '' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to be able to publish a GitHub release | |
issues: write # to be able to comment on released issues | |
pull-requests: write # to be able to comment on released pull requests | |
id-token: write # to enable use of OIDC | |
env: | |
GH_TOKEN: ${{ secrets.MY_TOKEN }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.22.5' | |
cache: false | |
- name: Install gomobile | |
run: | | |
go install golang.org/x/mobile/cmd/gomobile@latest | |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Setup Android environment | |
uses: android-actions/setup-android@v3 | |
- name: Build dependencies | |
run: | | |
git clone https://Blawuken:$GH_TOKEN@github.com/Blawuken/v2rayNG | |
mkdir ${{ github.workspace }}/v2rayNG/build | |
cd ${{ github.workspace }}/v2rayNG/build | |
git clone --depth=1 https://github.com/2dust/AndroidLibXrayLite | |
cd AndroidLibXrayLite | |
go get github.com/xtls/xray-core@${{ github.event.inputs.CORE }} || true | |
gomobile init | |
go mod tidy -v | |
gomobile bind -v -androidapi 27 -ldflags='-s -w' ./ | |
cp *.aar ${{ github.workspace }}/v2rayNG/app/libs/ | |
- name: Update library | |
run: | | |
cd ${{ github.workspace }}/v2rayNG | |
git config --global user.email jarbull87@gmail.com | |
git config --global user.name Blawuken | |
git add ${{ github.workspace }}/v2rayNG/app/libs/libv2ray.aar | |
git commit -m "Core: Bump ${{ github.event.inputs.CORE }}" | |
git push |