Skip to content

Fixing android-deploy #19

Fixing android-deploy

Fixing android-deploy #19

Workflow file for this run

name: android-deploy
on:
workflow_dispatch: # allow manual trigger
push:
branches: [deploy-android]
jobs:
deploy-android:
runs-on: ubuntu-22.04
environment: release
steps:
- name: Set Up Android tools
run: |
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager \
--sdk_root=$ANDROID_SDK_ROOT \
"platform-tools" "platforms;android-27" "build-tools;27.0.3"
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '8'
# Setup rust
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.69
# Checkout the code
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Make android native dependencies
run: make add-android-targets && make android
- name: Initialize root project
run: mvn install -N
- name: Create android-sdk target folder
run: mkdir -p concordium-android-sdk/target
- name: Build concordium-sdk and get javadoc
run: make && cd concordium-sdk && mvn --batch-mode --update-snapshots install && mvn lombok:delombok -f pom.xml && mvn javadoc:jar -f pom.xml && mv target/*-javadoc.jar ../concordium-android-sdk/target/concordium-android-sdk-javadoc.jar
- name: Build and test android sdk
run: cd concordium-android-sdk && mvn --batch-mode --update-snapshots install && mvn source:jar
- name: Set up Apache Maven Central
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '8'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_PASSWORD # env variable for token in deploy
gpg-private-key: GPG_KEY # Value of the GPG private key to import
gpg-passphrase: GPG_PASSPHRASE # Passphrase for the GPG private key
- name: Publish package to central maven repository
run: cd concordium-android-sdk && mvn --batch-mode deploy -Psign
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USR }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PWD }}
GPG_KEY: ${{ secrets.PKEY }}
GPG_PASSPHRASE: ${{secrets.SONATYPE_PHRASE }}