From 25836699cc710741cc477c111d7028e7fd0e7325 Mon Sep 17 00:00:00 2001 From: ogesaku Date: Mon, 28 Oct 2024 08:49:31 +0100 Subject: [PATCH] Enable version check on release [ci-release-auto-unblock] --- .github/workflows/release-auto.yml | 13 ++++++++----- .github/workflows/release.yml | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-auto.yml b/.github/workflows/release-auto.yml index c23b311..24baf43 100644 --- a/.github/workflows/release-auto.yml +++ b/.github/workflows/release-auto.yml @@ -1,4 +1,4 @@ -name: Release Auto +name: Auto Release on: workflow_dispatch: @@ -14,8 +14,8 @@ on: required: false default: false workflow_run: - workflows: [ "Build" ] - types: [ completed ] + workflows: ["Build"] + types: [completed] branches: - main - v*x.x @@ -25,8 +25,11 @@ on: jobs: check: - uses: coditory/workflows/.github/workflows/release-auto-check.yml@v1 + uses: coditory/workflows/.github/workflows/release-check.yml@v1 secrets: inherit + if: | + github.event_name != 'workflow_run' + || !contains(github.event.workflow_run.head_commit.message, '[ci-skip-build]') with: security-updates-only: ${{ inputs.security-updates-only || github.event_name == 'workflow_run' }} @@ -38,8 +41,8 @@ jobs: snapshot: uses: ./.github/workflows/release.yml - needs: check secrets: inherit + needs: check if: | (inputs.consider-snapshot || github.event_name == 'workflow_run') && needs.check.outputs.release != 'true' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96d1dde..2f4b2ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,3 +57,4 @@ jobs: java-version: 21 release-command: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion=$NEXT_VERSION snapshot-command: ./gradlew publishToSonatype -Pversion=$NEXT_VERSION + version-command: ./gradlew version --quiet --no-scan