ci: skip publish step if no release is needed#2561
Conversation
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2561 +/- ##
=======================================
Coverage 87.41% 87.41%
=======================================
Files 62 62
Lines 10251 10251
Branches 415 415
=======================================
Hits 8961 8961
Misses 1269 1269
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
zimeg
left a comment
There was a problem hiding this comment.
🦠 A note on more complicated changes than adjacent workflows. If that's alright-
| EXISTS=true | ||
| for PKG in $(npm query .workspace | jq -r '.[].name'); do | ||
| VERSION=$(npm query "#${PKG}" | jq -r '.[0].version') | ||
| if ! gh release view "${PKG}@${VERSION}" &>/dev/null; then | ||
| EXISTS=false | ||
| break | ||
| fi | ||
| done | ||
| echo "exists=${EXISTS}" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
👾 note: This is more complex for a workspace approach but should still let through a new package!
🧪 note: Tested with this change to find various truth values:
"name": "@slack/web-api",
- "version": "7.15.1",
+ "version": "7.15.2",|
@srtaalej Woot! Let's continue toward a faster release process and smoother non-releases adjacent. I will merge this. |
Summary
publishjob when releases already exist, avoiding unnecessary approval requestsNotes
This mirrors the release process found in bolt-js: slackapi/bolt-js#2894
Adapted for the monorepo — iterates over all workspaces and checks each package's release tag (
@slack/package@version) rather than a singlev${VERSION}tag.Requirements
🤖 Generated with Claude Code
Co-Authored-By: Claude svc-devxp-claude@slack-corp.com