AAR Publish #81
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: 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 "chore(package version): 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' | |
cache: 'gradle' | |
- name: Gradle Wrapper | |
run: gradle wrapper | |
- name: Publish with Gradle | |
env: | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} | |
OSSRH_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
run: ./gradlew lexactivator:publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository -PlexVersion=${{github.event.inputs.packageVersion}} --info --warning-mode all |