Fix geoip rule not created #2970
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: Release Build | |
| on: | |
| push: | |
| branches: | |
| - dev* | |
| paths: | |
| - "app/**" | |
| - "buildSrc/**" | |
| - "library/**" | |
| - ".github/workflows/release.yml" | |
| workflow_dispatch: | |
| inputs: | |
| release: | |
| description: 'Release (y/n)' | |
| required: false | |
| prerelease: | |
| description: 'Mark as pre-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@v7 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.26.4 | |
| cache-dependency-path: "library/core/go.sum" | |
| - name: Setup Go Mobile | |
| # https://github.com/golang/mobile/blob/c31d5b91ecc32c0d598b8fe8457d244ca0b4e815/cmd/gomobile/init.go#L83 | |
| run: | | |
| go install golang.org/x/mobile/cmd/gomobile@v0.0.0-20260611195102-4dd8f1dbf5d2 | |
| go install golang.org/x/mobile/cmd/gobind@v0.0.0-20260611195102-4dd8f1dbf5d2 | |
| - 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: Native Build | |
| env: | |
| ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
| run: | | |
| ./run lib core | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: app/libs/libexclavecore.aar | |
| name: "LibExclaveCore" | |
| - name: Gradle Cache | |
| uses: actions/cache@v6 | |
| 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 :app:downloadAssets | |
| ./gradlew :app:assembleOssRelease | |
| APK="app/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 }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: APKs | |
| path: artifacts | |
| - name: Publish Pre-release | |
| if: github.event.inputs.prerelease == 'y' | |
| run: | | |
| mkdir apks | |
| find artifacts -name "*.apk" -exec cp {} apks \; | |
| gh release create ${{ github.event.inputs.tag }} --notes="" --title=${{ github.event.inputs.tag }} --prerelease ./apks/* | |
| - name: Publish Release | |
| if: github.event.inputs.prerelease != 'y' | |
| run: | | |
| mkdir apks | |
| find artifacts -name "*.apk" -exec cp {} apks \; | |
| gh release create ${{ github.event.inputs.tag }} --notes="" --title=${{ github.event.inputs.tag }} ./apks/* |