fix lint #85
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: Android CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main"] | |
release: | |
types: ["published"] | |
jobs: | |
build: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
env: | |
CGO_ENABLED: 0 | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
check-latest: true | |
# Set up JDK | |
- name: Set Up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "zulu" | |
cache: "gradle" | |
- name: Install NDK | |
uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r26b | |
link-to-sdk: true | |
- name: Change wrapper permissions | |
run: chmod +x ./gradlew | |
- name: Build Tun2Socks AAR | |
run: ./gradlew buildTun2SocksAar | |
# Run Build Project | |
- name: Build gradle project | |
run: ./gradlew build | |
# Build APKs | |
- name: Build Release APK | |
run: ./gradlew assembleRelease | |
# Upload build aar to Artifacts | |
- name: Upload build aar to Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "tun2socks" | |
path: app/libs/tun2socks.aar | |
# Upload APK artifact | |
- name: Upload files to Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: oblivion-${{ github.sha }}-unsigned.apk | |
path: | | |
app/build/outputs/apk/release/*.apk |