Full scan up to derivation index #115
Workflow file for this run
This file contains 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
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'bindings_*' | |
pull_request: {} | |
name: Build & Publish framework for Kotlin library | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: "Show default version of NDK" | |
run: echo $ANDROID_NDK_ROOT | |
- name: "Check out PR branch" | |
uses: actions/checkout@v4 | |
- name: "Set up JDK" | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- uses: dtolnay/[email protected] | |
with: | |
targets: x86_64-linux-android, aarch64-linux-android, armv7-linux-androideabi, i686-linux-android | |
- uses: extractions/setup-just@v2 | |
with: | |
just-version: 1.5.0 # optional semver specification, otherwise latest | |
- name: "Install NDK" | |
run: | | |
cargo install cargo-ndk | |
- name: "Build Android bindings" | |
run: | | |
just kotlin-android | |
- name: "Build Android library" | |
working-directory: lwk_bindings/android_bindings | |
run: | | |
./gradlew build --console=plain | |
- name: Temporarily save artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lwk-artifact | |
path: lwk_bindings/android_bindings | |
retention-days: 1 | |
publish: | |
runs-on: ubuntu-20.04 | |
needs: build | |
if: startsWith(github.ref, 'refs/tags/bindings_') | |
steps: | |
- name: Retrieve saved artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: lwk-artifact | |
- name: "Set up JDK" | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Set RELEASE_REF | |
run: echo "RELEASE_REF=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Set RELEASE_VERSION | |
run: echo "RELEASE_VERSION=$(echo ${{ env.RELEASE_REF }} | sed 's/bindings_//')" >> $GITHUB_ENV | |
- name: set permissions | |
run: chmod +x ./gradlew | |
- name: Publish artifacts | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew publish -PlibraryVersion=${{ env.RELEASE_VERSION }} |