From 9c11c1274ef65c1ffaf900dc7863a4a54df727d1 Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Sat, 14 Jun 2025 12:30:39 +0200 Subject: [PATCH 1/2] Only run release on tags --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89351e41..3ed92c04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: needs: [build] # build job must pass before we can release if: github.event_name == 'push' - && (github.ref == 'refs/heads/release/2.x' || startsWith(github.ref, 'refs/tags/v')) + && startsWith(github.ref, 'refs/tags/v') && github.repository == 'mockito/mockito-scala' && !contains(toJSON(github.event.commits.*.message), '[skip release]') @@ -83,7 +83,7 @@ jobs: - name: Build and publish to Bintray/MavenCentral run: ./build.sh - && ./gradlew publishToSonatype githubRelease closeAndReleaseStagingRepository releaseSummary + && ./gradlew publishToSonatype githubRelease closeAndReleaseStagingRepositories releaseSummary env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} NEXUS_TOKEN_USER: ${{secrets.NEXUS_TOKEN_USER}} From 504e292aa2704a1f39fa0939fe9f75860d75f6f9 Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Sat, 14 Jun 2025 12:35:49 +0200 Subject: [PATCH 2/2] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ed92c04..2f888685 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: needs: [build] # build job must pass before we can release if: github.event_name == 'push' - && startsWith(github.ref, 'refs/tags/v') + && (github.ref == 'refs/heads/release/2.x' || startsWith(github.ref, 'refs/tags/v')) && github.repository == 'mockito/mockito-scala' && !contains(toJSON(github.event.commits.*.message), '[skip release]')