Initial commit #1
Workflow file for this run
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: DEPLOY | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
inputs: | |
forced_version: | |
description: 'FORCED_VERSION to use' | |
required: true | |
type: string | |
#permissions: | |
# contents: write | |
# discussions: write | |
env: | |
CI: true | |
FORCED_VERSION: ${{ inputs.forced_version || github.ref }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPEUSERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPEPASSWORD }} | |
JAVA_VERSION: 17 | |
JAVA_DISTRIBUTION: zulu | |
jobs: | |
##start: | |
## runs-on: ubuntu-latest | |
## outputs: | |
## stagedRepositoryId: ${{ steps.releaseStep.outputs.stagedRepositoryId }} | |
## steps: | |
## - { name: Checkout, uses: actions/checkout@v3 } | |
## - { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
## - { name: Prepare Gradle, uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 } # https://github.com/gradle/actions/releases/tag/v3.5.0 | |
## - { id: releaseStep, name: Start Maven Central Staging Repository, run: ./gradlew --no-configuration-cache startReleasingMavenCentral } | |
publish: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { os: ubuntu-latest, publishTask: "publishLinuxX64PublicationToMavenLocal publishLinuxArm64PublicationToMavenLocal" } | |
- { os: ubuntu-latest, publishTask: "publishMingwX64PublicationToMavenLocal" } | |
- { os: ubuntu-latest, publishTask: "publishAndroidDebugPublicationToMavenLocal publishAndroidReleasePublicationToMavenLocal" } | |
- { os: ubuntu-latest, publishTask: "publishKotlinMultiplatformPublicationToMavenLocal publishJvmPublicationToMavenLocal" } | |
- { os: ubuntu-latest, publishTask: "publishJsPublicationToMavenLocal publishWasmJsPublicationToMavenLocal" } | |
- { os: macos-latest, publishTask: "publishMacosX64PublicationToMavenLocal publishMacosArm64PublicationToMavenLocal" } | |
- { os: macos-latest, publishTask: "publishTvosArm64PublicationToMavenLocal publishTvosSimulatorArm64PublicationToMavenLocal publishTvosX64PublicationToMavenLocal" } | |
- { os: macos-latest, publishTask: "publishIosArm64PublicationToMavenLocal publishIosSimulatorArm64PublicationToMavenLocal publishIosX64PublicationToMavenLocal" } | |
- { os: macos-latest, publishTask: "publishWatchosArm64PublicationToMavenLocal publishWatchosArm32PublicationToMavenLocal publishWatchosDeviceArm64PublicationToMavenLocal publishWatchosSimulatorArm64PublicationToMavenLocal" } | |
timeout-minutes: 300 | |
runs-on: ${{ matrix.os }} | |
##needs: [start] | |
##env: { stagedRepositoryId: "${{ needs.start.outputs.stagedRepositoryId }}" } | |
steps: | |
##- { name: Print stagedRepositoryId=$stagedRepositoryId, run: "echo 'stagedRepositoryId: $stagedRepositoryId'" } | |
- name: Replace MavenLocal with MavenLocal | |
id: replace | |
run: | | |
publishTaskLocal=$(echo "${{ matrix.publishTask }}" | tr -d '\n') | |
publishTaskRepository=$(echo "${{ matrix.publishTask }}" | sed 's/MavenLocal/MavenRepository/g' | tr -d '\n') | |
echo "publishTaskLocal=${publishTaskLocal}" >> $GITHUB_ENV | |
echo "publishTaskRepository=${publishTaskRepository}" >> $GITHUB_ENV | |
- { name: Print publishTaskLocal, run: "echo 'publishTaskLocal: ${{ env.publishTaskLocal }}'" } | |
- { name: Print publishTaskRepository, run: "echo 'publishTaskRepository: ${{ env.publishTaskRepository }}'" } | |
- { name: Checkout, uses: actions/checkout@v3 } | |
- { name: Use Node.js 20.x, uses: actions/setup-node@v3, with: { node-version: 20.x } } | |
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
- { name: Prepare Gradle, uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 } # https://github.com/gradle/actions/releases/tag/v3.5.0 | |
- { name: Initialize Gradle, run: ./gradlew --no-configuration-cache } | |
- { name: Publish Publications To Maven Local, run: "./gradlew --no-configuration-cache --parallel ${{ env.publishTaskLocal }}" } | |
- { name: Start Maven Central Staging Repository, run: ./gradlew --no-configuration-cache startReleasingMavenCentral } | |
- { name: Publish Publications To Maven Repository, run: "./gradlew --no-configuration-cache --parallel --max-workers=8 ${{ env.publishTaskRepository }}" } | |
- { name: Release to Maven Central, run: ./gradlew --no-configuration-cache releaseMavenCentral } | |
##finalize: | |
## runs-on: ubuntu-latest | |
## needs: [start, publish] | |
## env: { stagedRepositoryId: "${{ needs.start.outputs.stagedRepositoryId }}" } | |
## steps: | |
## - { name: Checkout, uses: actions/checkout@v3 } | |
## - { name: Use Node.js 20.x, uses: actions/setup-node@v3, with: { node-version: 20.x } } | |
## - { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
## - { name: Prepare Gradle, uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 } # https://github.com/gradle/actions/releases/tag/v3.5.0 | |
## - { name: Initialize Gradle, run: ./gradlew --no-configuration-cache } | |
## - { name: Release to Maven Central, run: ./gradlew --no-configuration-cache releaseMavenCentral } |