Files
coco 723ce1af5c a
2026-07-03 15:12:48 +08:00

66 lines
2.1 KiB
YAML

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
# TEMPORARY UNTIL https://github.com/vanniktech/gradle-maven-publish-plugin/issues/259 is closed
# ETA early July 2025
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-configuration-cache
- name: Publish Kobweb artifacts (Gradle Plugin Portal)
if: inputs.repo-gradle-portal
run: ./gradlew publishPlugins