fix: update jni to v0.0.5, fix nested package proto path #6
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build release artifacts | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| goarch: [arm64, amd64] | |
| include: | |
| - goarch: arm64 | |
| abi: arm64-v8a | |
| - goarch: amd64 | |
| abi: x86_64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| cache: true | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Set up Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install Android NDK and build-tools | |
| run: sdkmanager --install "ndk;27.0.12077973" "build-tools;35.0.0" "platforms;android-35" | |
| - name: Build all artifacts | |
| run: make dist magisk | |
| env: | |
| DIST_GOARCH: ${{ matrix.goarch }} | |
| ANDROID_SDK: /usr/local/lib/android/sdk | |
| DIST_NDK: /usr/local/lib/android/sdk/ndk/27.0.12077973 | |
| - name: Decode signing keystore | |
| run: | | |
| if [ -n "$JNISERVICE_KEYSTORE_B64" ]; then | |
| echo "$JNISERVICE_KEYSTORE_B64" | base64 -d > build/release.keystore | |
| fi | |
| env: | |
| JNISERVICE_KEYSTORE_B64: ${{ secrets.JNISERVICE_KEYSTORE_B64 }} | |
| - name: Build APK | |
| run: | | |
| EXTRA_ENV="" | |
| if [ -f build/release.keystore ]; then | |
| export JNISERVICE_KEYSTORE=build/release.keystore | |
| export JNISERVICE_KEYSTORE_PASSWORD="${KS_PASSWORD}" | |
| fi | |
| make apk | |
| env: | |
| DIST_GOARCH: ${{ matrix.goarch }} | |
| ANDROID_SDK: /usr/local/lib/android/sdk | |
| DIST_NDK: /usr/local/lib/android/sdk/ndk/27.0.12077973 | |
| KS_PASSWORD: ${{ secrets.JNISERVICE_KEYSTORE_PASSWORD }} | |
| - name: Prepare release artifacts with descriptive names | |
| run: | | |
| mkdir -p release | |
| TAG="${GITHUB_REF_NAME}" | |
| ABI="${{ matrix.abi }}" | |
| # CLI tool for Linux hosts | |
| cp build/jnicli-linux-${{ matrix.goarch }} \ | |
| "release/jnicli-${TAG}-linux-${{ matrix.goarch }}" | |
| # CLI tool for Android devices | |
| cp build/jnicli-android-${{ matrix.goarch }} \ | |
| "release/jnicli-${TAG}-android-${ABI}" | |
| # Admin tool for Android devices | |
| cp build/jniserviceadmin-android-${{ matrix.goarch }} \ | |
| "release/jniserviceadmin-${TAG}-android-${ABI}" | |
| # APK installer (no root required) | |
| cp build/jniservice-${ABI}.apk \ | |
| "release/jniservice-${TAG}-${ABI}.apk" | |
| # Magisk module (rooted devices, auto-start on boot) | |
| cp build/jniservice-magisk-${ABI}.zip \ | |
| "release/jniservice-magisk-${TAG}-${ABI}.zip" | |
| ls -la release/ | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-${{ matrix.goarch }} | |
| path: release/ | |
| release: | |
| name: Create GitHub release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: List artifacts | |
| run: find artifacts -type f | sort | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| artifacts/**/* |