Skip to content

Merge pull request #13 from UbiqueInnovation/bugfix/objc-references #13

Merge pull request #13 from UbiqueInnovation/bugfix/objc-references

Merge pull request #13 from UbiqueInnovation/bugfix/objc-references #13

Workflow file for this run

name: Publish to Ubique Maven and Sonatype Nexus
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
name: "Publish Djinni SupportLib AAR to Ubique Maven and Sonatype Nexus"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
- name: Set Build Variables
id: vars
run: |
artifactId=$(sed -n -e 's/^POM_ARTIFACT_ID=//p' android/gradle.properties)
echo ::set-output name=artifactId::$artifactId
version=$(sed -n -e 's/^VERSION_NAME=//p' android/gradle.properties)
echo ::set-output name=version::$version
- name: Setup GPG Key
env:
SIGNING_KEY_ARMOR: ${{secrets.UBIQUE_MAVEN_SIGNING_KEY_ARMOR_BASE64}}
run: |
echo "Create .gpg key from secret"
echo $SIGNING_KEY_ARMOR | base64 --decode > ./signingkey.asc
gpg --quiet --output $GITHUB_WORKSPACE/signingkey.gpg --dearmor ./signingkey.asc
- name: Build and Upload to Ubique Maven
env:
SIGNING_KEY_ID: ${{secrets.UBIQUE_MAVEN_SIGNING_KEY_ID}}
SIGNING_KEY_PASSWORD: ${{secrets.UBIQUE_MAVEN_SIGNING_KEY_PASSPHRASE}}
UBIQUE_ARTIFACTORY_URL: ${{secrets.UBIQUE_ARTIFACTORY_URL}}
UBIQUE_ARTIFACTORY_USER: ${{secrets.UBIQUE_ARTIFACTORY_USER}}
UBIQUE_ARTIFACTORY_PASS: ${{secrets.UBIQUE_ARTIFACTORY_PASS}}
run: |
cd android
chmod 0777 gradlew
echo "### Maven Dependency - Ubique Maven" >> $GITHUB_STEP_SUMMARY
./gradlew publishAllPublicationsToUbiqueMavenRepository -Psigning.secretKeyRingFile=$GITHUB_WORKSPACE/signingkey.gpg -Psigning.password=$SIGNING_KEY_PASSWORD -Psigning.keyId=$SIGNING_KEY_ID
echo "| Git Commit | Artifact ID | Maven Version |" >> $GITHUB_STEP_SUMMARY
echo "| --- | --- | --- |" >> $GITHUB_STEP_SUMMARY
echo "| $GITHUB_SHA | ${{ steps.vars.outputs.artifactId }} | ${{ steps.vars.outputs.version }} |" >> $GITHUB_STEP_SUMMARY
- name: Build and Upload to Maven Central
env:
SIGNING_KEY_ID: ${{secrets.UBIQUE_MAVEN_SIGNING_KEY_ID}}
SIGNING_KEY_PASSWORD: ${{secrets.UBIQUE_MAVEN_SIGNING_KEY_PASSPHRASE}}
SONATYPE_NEXUS_USERNAME: ${{secrets.UBIQUE_MAVEN_CENTRAL_USERNAME}}
SONATYPE_NEXUS_PASSWORD: ${{secrets.UBIQUE_MAVEN_CENTRAL_PASS}}
UBIQUE_ARTIFACTORY_URL: ${{secrets.UBIQUE_ARTIFACTORY_URL}}
UBIQUE_ARTIFACTORY_USER: ${{secrets.UBIQUE_ARTIFACTORY_USER}}
UBIQUE_ARTIFACTORY_PASS: ${{secrets.UBIQUE_ARTIFACTORY_PASS}}
run: |
cd android
chmod 0777 gradlew
echo "### Maven Dependency - Maven Central" >> $GITHUB_STEP_SUMMARY
./gradlew publishAllPublicationsToMavenCentral -Psigning.secretKeyRingFile=$GITHUB_WORKSPACE/signingkey.gpg -Psigning.password=$SIGNING_KEY_PASSWORD -Psigning.keyId=$SIGNING_KEY_ID -PmavenCentralUsername=$SONATYPE_NEXUS_USERNAME -PmavenCentralPassword=$SONATYPE_NEXUS_PASSWORD
echo "[Maven Central](https://search.maven.org/artifact/ch.admin.geo.openswissmaps/${{ steps.vars.outputs.artifactId }}/${{ steps.vars.outputs.version }}/aar)" >> $GITHUB_STEP_SUMMARY
echo "| Git Commit | Artifact ID | Maven Version |" >> $GITHUB_STEP_SUMMARY
echo "| --- | --- | --- |" >> $GITHUB_STEP_SUMMARY
echo "| $GITHUB_SHA | ${{ steps.vars.outputs.artifactId }} | ${{ steps.vars.outputs.version }} |" >> $GITHUB_STEP_SUMMARY