Skip to content

Release

Release #13

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
TAGS:
description: 'tag of the version release'
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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.MY_TOKEN }}
NEKO_TOKEN: ${{ secrets.NEKO_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare
run: |
sudo apt-get -y install dos2unix apksigner
- name: JDK Setup
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: '^1.22.2'
cache: false
- name: Install gomobile
run: |
go install golang.org/x/mobile/cmd/gomobile@latest
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
go install github.com/tcnksm/ghr@latest
- name: Setup Android environment
uses: android-actions/setup-android@v3
- name: Clone
run: |
git clone --depth=1 https://AnGgIt86:$NEKO_TOKEN@github.com/AnGgIt86/v2rayNG
- name: Build
run: |
cd ${{ github.workspace }}/v2rayNG
dos2unix ./gradlew
./gradlew assemble
- name: Sign APK
run: |
cd ${{ github.workspace }}/v2rayNG
apksigner sign --key platform.pk8 --cert platform.x509.pem app/build/outputs/apk/release/*arm64-v8a.apk
apksigner sign --key platform.pk8 --cert platform.x509.pem app/build/outputs/apk/release/*armeabi-v7a.apk
apksigner sign --key platform.pk8 --cert platform.x509.pem app/build/outputs/apk/release/*x86.apk
apksigner sign --key platform.pk8 --cert platform.x509.pem app/build/outputs/apk/release/*x86_64.apk
apksigner sign --key platform.pk8 --cert platform.x509.pem app/build/outputs/apk/release/*universal.apk
- name: Release
run: |
cd ${{ github.workspace }}/v2rayNG/app/build/outputs/apk
ls release/*
ghr -t ${GH_TOKEN} -u Blawuken -r Neko_v2rayNG ${{ github.event.inputs.TAGS }} release