Publish Kobweb artifacts #677
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 Kobweb artifacts | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| repo-gcloud: | |
| type: boolean | |
| description: "Repository: GCloud" | |
| default: true | |
| repo-maven-central: | |
| type: boolean | |
| description: "Repository: Maven Central" | |
| default: true | |
| repo-gradle-portal: | |
| type: boolean | |
| description: "Repository: Gradle Plugin Portal (release only)" | |
| default: false | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| env: | |
| # See: https://vanniktech.github.io/gradle-maven-publish-plugin/central/#secrets | |
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.VARABYTE_SIGNING_KEY }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.VARABYTE_SIGNING_KEY_ID }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.VARABYTE_SIGNING_PASSWORD }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| build-scan-publish: true | |
| build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use" | |
| build-scan-terms-of-use-agree: "yes" | |
| cache-read-only: false | |
| - name: Add secret Gradle properties | |
| env: | |
| GRADLE_PROPERTIES: ${{ secrets.VARABYTE_GRADLE_PROPERTIES }} | |
| run: | | |
| mkdir -p ~/.gradle/ | |
| echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV | |
| echo "${GRADLE_PROPERTIES}" > ~/.gradle/gradle.properties | |
| - name: Publish Kobweb artifacts (GCloud) | |
| if: inputs.repo-gcloud | |
| run: ./gradlew publishAllPublicationsToGCloudMavenRepository | |
| - name: Publish Kobweb artifacts (Maven Central) | |
| if: inputs.repo-maven-central | |
| run: ./gradlew publishAllPublicationsToMavenCentralRepository | |
| - name: Publish Kobweb artifacts (Gradle Plugin Portal) | |
| if: inputs.repo-gradle-portal | |
| run: ./gradlew publishPlugins |