Publish Native Android Library #27
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
name: Publish Native Android Library | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
publish-android: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- uses: actions/checkout@v2 | |
- name: create local.properties file for app creds | |
env: | |
PORTALS_KEY: ${{ secrets.portals_key }} | |
run: echo portals_key=\"$PORTALS_KEY\" > ./local.properties | |
- name: set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Grant execute permission for publishing script | |
run: chmod +x ./scripts/publish-android.sh | |
- name: Assemble release and add artifact to GH Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: ${{ github.event_name == 'release' }} | |
run: | | |
./gradlew assembleRelease | |
gh release upload ${{ github.event.release.tag_name }} ./IonicPortals/build/outputs/aar/*.aar | |
- name: Run publish script | |
working-directory: ./scripts | |
env: | |
ANDROID_OSSRH_USERNAME: ${{ secrets.ANDROID_OSSRH_USERNAME }} | |
ANDROID_OSSRH_PASSWORD: ${{ secrets.ANDROID_OSSRH_PASSWORD }} | |
ANDROID_SIGNING_KEY_ID: ${{ secrets.ANDROID_SIGNING_KEY_ID }} | |
ANDROID_SIGNING_PASSWORD: ${{ secrets.ANDROID_SIGNING_PASSWORD }} | |
ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }} | |
ANDROID_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.ANDROID_SONATYPE_STAGING_PROFILE_ID }} | |
run: ./publish-android.sh |