From 082d6757cf3e4d7be00d571a60135484177c36a6 Mon Sep 17 00:00:00 2001 From: Brice Dutheil Date: Sat, 23 Mar 2024 00:53:20 +0100 Subject: [PATCH] fix: publication on manual dispatch --- .github/workflows/release.yaml | 12 +++++++++--- build.gradle.kts | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ea48ecc3..47d1d12b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,4 @@ -name: CI-release +name: CI-release ${{ github.event.inputs.tag || github.event.release.tag_name }} on: # Release event https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#release @@ -14,8 +14,12 @@ on: description: 'Tag to release' required: true + +# Environment variables +# https://docs.github.com/en/actions/learn-github-actions/variables + jobs: - publish: + release-publish: runs-on: ubuntu-latest steps: - name: Check semver version in tag @@ -50,4 +54,6 @@ jobs: # Don't forget to deploy the release to central # * 'Close' the repo to trigger the evaluations of to components against the requirements # * 'Release' the repo -# https://central.sonatype.org/publish/release/ \ No newline at end of file +# https://central.sonatype.org/publish/release/ +# If any errors occur, check the FAQ +# https://central.sonatype.org/faq/400-error/ \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index c9a28368..403063b6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -159,8 +159,8 @@ configure(fireplaceModules) { repositories { maven { if (providers.gradleProperty("publish.central").orNull.toBoolean()) { - val isGithubRelease = - providers.environmentVariable("GITHUB_EVENT_NAME").get().equals("release", true) + val isGithubRelease = providers.environmentVariable("GITHUB_JOB").get() + .equals("release-publish", true) name = "central" setUrl(isSnapshot.map { snap -> uri(