diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e0d1bcb..facc7bdc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,6 @@ permissions: contents: read env: - CARGO_TERM_COLOR: always NDK_VERSION: '25.2.9519653' jobs: @@ -26,11 +25,12 @@ jobs: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /opt/depot_tools cd /opt/depot_tools git checkout "$DEPOT_TOOLS_GIT_HASH^{commit}" - echo "/opt/depot_tools" >> "$GITHUB_PATH" + echo "/opt/depot_tools" >> $GITHUB_PATH env: DEPOT_TOOLS_GIT_HASH: 8ebbd5189d8a9df51ee3dad42dc04651620424bb - uses: actions/checkout@v4 + - run: | git config --global user.name "build" git config --global user.email "localhost" @@ -38,8 +38,14 @@ jobs: - name: Free up disk space in runner uses: ./.github/actions/disk-cleanup + - name: Install NDK + run: | + yes | "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" --install "ndk;$NDK_VERSION" + echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/$NDK_VERSION" >> $GITHUB_ENV + - name: Install Rust targets - run: rustup toolchain install $(cat rust-toolchain) --profile minimal --target aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android + run: | + rustup toolchain install $(cat rust-toolchain) --profile minimal --target aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android - name: Set up JDK 17 uses: actions/setup-java@v4 @@ -53,22 +59,22 @@ jobs: env: DEPOT_TOOLS_UPDATE: 0 - - name: Build library - run: ANDROID_NDK_HOME="$ANDROID_HOME/ndk/$NDK_VERSION" bin/build-aar --arch arm arm64 x64 --release-build + - name: Build library (AAR) + run: ./bin/build-aar --arch arm arm64 x64 --release-build env: OVERRIDE_VERSION: ${{ github.ref_name }} - name: Log checksums run: find out/release/libs -type f -exec sha256sum '{}' + - - name: Upload AARs + - name: Upload libs uses: actions/upload-artifact@v4 with: name: libs path: out/release/libs/ - name: Publish to GitHub Packages - run: ANDROID_NDK_HOME="$ANDROID_HOME/ndk/$NDK_VERSION" ./bin/build-aar --arch arm arm64 x64 --release-build --publish + run: ./bin/build-aar --arch arm arm64 x64 --release-build --publish env: OVERRIDE_VERSION: ${{ github.ref_name }} GITHUB_TOKEN: ${{ secrets.PUBLISH_PAT }}