Skip to content

Commit 40ca7a8

Browse files
authored
ci: fix existing-versions-check for SNAPSHOT pull requests (#11512)
1 parent 55bb607 commit 40ca7a8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/versions.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ jobs:
2727
- run: ./generation/check_non_release_please_versions.sh
2828

2929
# For Release Please pull requests, the artifacts being published must not
30-
# have the duplicate versions in Maven Central
30+
# have the duplicate versions in Maven Central or "SNAPSHOT" versions.
31+
# When Release Please switches non-SNAPSHOT versions to SNAPSHOT versions,
32+
# this check should be skipped. Note that the "autorelease: snapshot" label
33+
# was added after the pull request is created.
3134
existing-versions-check:
3235
runs-on: ubuntu-latest
3336
if: |
3437
github.repository_owner == 'googleapis' && github.head_ref == 'release-please--branches--main' &&
35-
(github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'autorelease: snapshot'))
38+
!endsWith(github.event.pull_request.title, 'SNAPSHOT')
3639
steps:
3740
- run: sudo apt-get update -y
3841
- run: sudo apt-get install libxml2-utils

0 commit comments

Comments
 (0)