Skip to content

TEST

TEST #59

Workflow file for this run

name: Build APK TEST
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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 }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: JDK Setup
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: "Gradle Wrapper validation"
uses: gradle/wrapper-validation-action@v2
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.7
build-root-directory: systems/commons
cache-disabled: false
cache-read-only: false
cache-write-only: false
cache-overwrite-existing: false
gradle-home-cache-includes: caches notifications
gradle-home-cache-cleanup: false
add-job-summary: always
add-job-summary-as-pr-comment: never
dependency-graph: disabled
dependency-graph-continue-on-failure: true
build-scan-publish: false
generate-job-summary: true
gradle-home-cache-strict-match: false
workflow-job-context: null
- name: "Setup matchers"
run: |
# Setting up matchers...
matchers_dir='${{ github.workspace }}/.github/matchers'
matcher_list()
{
echo 'gradle-build-matcher.json'
echo 'gradle-build-kotlin-error-matcher.json'
}
matcher_list | while IFS='' read -r NAME; do
if test -f "${matchers_dir:?}/${NAME:?}"; then
echo "::add-matcher::${matchers_dir:?}/${NAME:?}"
echo "Matcher configured: ${NAME:?}"
fi
done
- name: Clone
run: |
git clone https://Blawuken:$GH_TOKEN@github.com/Blawuken/v2rayNG
- name: Build project
run: |
cd ${{ github.workspace }}/v2rayNG
./gradlew --no-daemon build
- name: Build APK RELEASE
run: |
cd ${{ github.workspace }}/v2rayNG
./gradlew assembleRelease
- name: Sign APK
run: |
echo "=============================="
ls ${{ github.workspace }}/v2rayNG/
echo "=============================="
ls ${{ github.workspace }}/v2rayNG/app/build/outputs/apk/release/
echo "=============================="
echo ""
echo ""
sudo apt-get -y install apksigner
cd ${{ github.workspace }}/v2rayNG
apksigner sign --key platform.pk8 --cert platform.x509.pem app/build/outputs/apk/release/*all.apk
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
- name: Upload APK all variant
uses: actions/upload-artifact@v4
with:
name: all
path: ${{ github.workspace }}/v2rayNG/app/build/outputs/apk/release/*all.apk
- name: Upload APK variant arm64
uses: actions/upload-artifact@v4
with:
name: arm64
path: ${{ github.workspace }}/v2rayNG/app/build/outputs/apk/release/*arm64-v8a.apk
- name: Upload APK variant armeabi-v7a
uses: actions/upload-artifact@v4
with:
name: armeabi-v7a
path: ${{ github.workspace }}/v2rayNG/app/build/outputs/apk/release/*armeabi-v7a.apk