1.5.1 #24
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 to Maven Central | |
| permissions: | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: [ released ] | |
| jobs: | |
| build-android-release: | |
| name: Build Android library | |
| uses: ./.github/workflows/buildAndroidRelease.yml | |
| build-ios-release: | |
| name: Build iOS library | |
| uses: ./.github/workflows/buildIosRelease.yml | |
| publish: | |
| name: Publish library | |
| needs: | |
| - build-android-release | |
| - build-ios-release | |
| strategy: | |
| matrix: | |
| include: | |
| - target: publishIosArm64PublicationToMavenCentralRepository | |
| os: macos-14 | |
| - target: publishIosSimulatorArm64PublicationToMavenCentralRepository | |
| os: macos-14 | |
| - target: publishAndroidReleasePublicationToMavenCentralRepository | |
| os: ubuntu-latest | |
| - target: publishKotlinMultiplatformPublicationToMavenCentralRepository | |
| os: ubuntu-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Validate Gradle Wrapper | |
| uses: gradle/actions/wrapper-validation@v3 | |
| - name: Set up Java JDK ${{ vars.JAVA_JDK_VERSION }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '${{ vars.JAVA_JDK_VERSION }}' | |
| distribution: "zulu" | |
| - name: Set Xcode version | |
| if: startsWith(matrix.os, 'macos') | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '${{ vars.XCODE_VERSION }}' | |
| - name: Caching Kotlin/Native tooling | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.konan | |
| key: ${{ runner.os }}-${{ hashFiles('**/.lock') }} | |
| - name: Publish to Maven Central | |
| run: ./gradlew ${{ matrix.target }} --no-configuration-cache | |
| env: | |
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_SECRET_KEY_ID }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SECRET_KEY_PASSWORD }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET_KEY_CONTENT }} | |
| timeout-minutes: 30 # Set timeout for the step | |
| notify: | |
| name: Send Slack notification | |
| needs: publish | |
| uses: ./.github/workflows/notify.yml | |
| secrets: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |