Skip to content

Release

Release #51

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
NDK_VERSION: '25.2.9519653'
jobs:
publish:
name: Publish
runs-on: ubuntu-22.04
steps:
- name: Free up disk space
run: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/share/powershell /usr/local/share/chromium
- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- name: Install depot_tools
run: |
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"
env:
DEPOT_TOOLS_GIT_HASH: 8ebbd5189d8a9df51ee3dad42dc04651620424bb
- uses: actions/checkout@v4
- run: |
git config --global user.name "build"
git config --global user.email "localhost"
- name: Install Rust targets
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
with:
distribution: temurin
java-version: 17
cache: gradle
- name: Prepare workspace for Android
run: bin/prepare-workspace android
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
env:
OVERRIDE_VERSION: ${{ github.ref_name }}
- name: Log checksums
run: find out/release/libs -type f -exec sha256sum '{}' +
- name: Upload AARs
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
env:
OVERRIDE_VERSION: ${{ github.ref_name }}
GITHUB_TOKEN: ${{ secrets.PUBLISH_PAT }}