AAR Publish #26
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: AAR Publish | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| libraryVersion: | |
| description: 'Library Version' | |
| required: true | |
| default: '' | |
| packageVersion: | |
| description: 'Package Version' | |
| required: true | |
| default: '' | |
| jobs: | |
| update-version: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Update Version | |
| run: | | |
| sed -i '/VERSION=/!b;cVERSION=\"v${{ github.event.inputs.libraryVersion }}";' ./download-libs.sh | |
| - name: Commit, Tag and Push | |
| run: | | |
| git add ./download-libs.sh | |
| git config user.name github-actions | |
| git config user.email [email protected] | |
| git commit -m "updated version" | exit 0 | |
| git tag ${{ github.event.inputs.packageVersion }} | |
| git push & git push --tags | |
| publish: | |
| needs: update-version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - run: git pull origin main --ff-only | |
| - name: Assemble Resources | |
| run: ./download-libs.sh | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Setup Gradle 8.14 | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| gradle-version: '8.14' | |
| - name: Gradle Wrapper | |
| run: gradle wrapper --gradle-version=8.14 | |
| - name: Publish with Gradle | |
| env: | |
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY_ARMORED }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSPHRASE }} | |
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }} | |
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }} | |
| run: ./gradlew lexfloatclient:publishAndReleaseToMavenCentral -PlexVersion=${{github.event.inputs.packageVersion}} --info --warning-mode all |