Migrate Fresco OSS publishing from legacy OSSRH to Sonatype Central P… #30
Workflow file for this run
This file contains hidden or 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 | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Tag to upload artifacts to" | |
| required: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: | | |
| 11 | |
| 17 | |
| cache: gradle | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install NDK | |
| id: setup-ndk | |
| uses: nttld/setup-ndk@v1 | |
| with: | |
| ndk-version: r27b | |
| - name: Register NDK | |
| run: | | |
| echo $PATH | |
| echo 'ndk.path=/opt/hostedtoolcache/ndk/r27b/x64' >> local.properties | |
| - name: Write GPG Sec Ring | |
| run: echo '${{ secrets.GPG_KEY_CONTENTS }}' | base64 -d > /tmp/secring.gpg | |
| - name: Update gradle.properties | |
| run: echo -e "signing.secretKeyRingFile=/tmp/secring.gpg\nsigning.keyId=${{ secrets.SIGNING_KEY_ID }}\nsigning.password=${{ secrets.SIGNING_PASSWORD }}\nmavenCentralPassword=${{ secrets.SONATYPE_NEXUS_PASSWORD }}\nmavenCentralUsername=${{ secrets.SONATYPE_NEXUS_USERNAME }}" >> gradle.properties | |
| - name: Upload and release Android Archives | |
| run: ./gradlew publishAndReleaseToMavenCentral --no-daemon --no-parallel --info --stacktrace | |
| env: | |
| ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
| - name: Clean secrets | |
| if: always() | |
| run: rm /tmp/secring.gpg |