Create Release & Publish To Maven Central #25
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: Create Release & Publish To Maven Central | |
on: | |
workflow_dispatch: | |
jobs: | |
create-release-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create Release | |
run: | | |
RELEASE_VERSION=$(cat version.resolved) | |
gh release create $RELEASE_VERSION --generate-notes | |
env: | |
GH_TOKEN: ${{ secrets.PO_GITHUB_TOKEN }} | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Build | |
run: | | |
./gradlew :sdk:assembleProductionRelease | |
./gradlew :checkout-3ds:assembleProductionRelease | |
./gradlew :ui-core:assembleProductionRelease | |
./gradlew :ui:assembleProductionRelease | |
- name: Publish To Maven Central | |
run: | | |
./gradlew :sdk:publishProductionReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --max-workers=1 | |
./gradlew :checkout-3ds:publishProductionReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --max-workers=1 | |
./gradlew :ui-core:publishProductionReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --max-workers=1 | |
./gradlew :ui:publishProductionReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --max-workers=1 | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | |
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
DEVELOPER_ID: ${{ secrets.DEVELOPER_ID }} | |
DEVELOPER_NAME: ${{ secrets.DEVELOPER_NAME }} | |
DEVELOPER_EMAIL: ${{ secrets.DEVELOPER_EMAIL }} |