ShadowQUIC Plugin Release Build #32
Workflow file for this run
This file contains hidden or 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: ShadowQUIC Plugin Release Build | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| release: | |
| description: 'Release (y/n)' | |
| required: false | |
| tag: | |
| description: 'Release Tag' | |
| required: false | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Checkout Submodule | |
| run: | | |
| git submodule update --init plugin/shadowquic/src/main/rust/shadowquic | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 21 | |
| cache: 'gradle' | |
| - name: Setup Android NDK | |
| id: setup-ndk | |
| uses: nttld/setup-ndk@v1 | |
| with: | |
| ndk-version: r29 | |
| - name: Setup Rust | |
| run: | | |
| rustup toolchain install 1.95.0 | |
| rustup override set 1.95.0 | |
| rustup target add armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android | |
| - name: Native Build | |
| env: | |
| ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
| run: | | |
| ./run plugin shadowquic | |
| - name: Gradle cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.gradle | |
| key: gradle-${{ hashFiles('**/*.gradle.kts') }} | |
| - name: Gradle Build | |
| run: | | |
| echo "sdk.dir=${ANDROID_HOME}" > local.properties | |
| export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" | |
| ./gradlew :plugin:shadowquic:assembleOssRelease | |
| APK="plugin/shadowquic/build/outputs/apk/oss/release" | |
| echo "APK=$APK" >> $GITHUB_ENV | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: APKs | |
| path: ${{ env.APK }} | |
| publish: | |
| name: Publish Release | |
| if: github.event.inputs.release == 'y' && github.event.inputs.tag != '' | |
| runs-on: ubuntu-latest | |
| needs: build | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: APKs | |
| path: artifacts | |
| - name: Publish Release | |
| run: | | |
| mkdir apks | |
| find artifacts -name "*.apk" -exec cp {} apks \; | |
| gh release create --latest=false ${{ github.event.inputs.tag }} --notes="" --title=${{ github.event.inputs.tag }} ./apks/* |