Skip to content

ci: skip publish step if no release is needed#2561

Merged
zimeg merged 1 commit intomainfrom
ci/skip-publish-if-released
Apr 27, 2026
Merged

ci: skip publish step if no release is needed#2561
zimeg merged 1 commit intomainfrom
ci/skip-publish-if-released

Conversation

@zimeg
Copy link
Copy Markdown
Member

@zimeg zimeg commented Apr 27, 2026

Summary

  • Adds a check after the changesets step to see if all workspace packages already have GitHub releases for their current versions
  • Skips the publish job when releases already exist, avoiding unnecessary approval requests

Notes

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 single v${VERSION} tag.

Requirements

🤖 Generated with Claude Code

Co-Authored-By: Claude svc-devxp-claude@slack-corp.com

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg requested a review from a team as a code owner April 27, 2026 18:35
@zimeg zimeg added semver:patch github_actions Pull requests that update GitHub Actions code labels Apr 27, 2026
@zimeg zimeg self-assigned this Apr 27, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 27, 2026

⚠️ No Changeset found

Latest commit: 775f3bd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.41%. Comparing base (d5fc190) to head (775f3bd).
✅ All tests successful. No failed tests found.

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           
Flag Coverage Δ
cli-hooks 87.41% <ø> (ø)
cli-test 87.41% <ø> (ø)
logger 87.41% <ø> (ø)
oauth 87.41% <ø> (ø)
socket-mode 87.41% <ø> (ø)
web-api 87.41% <ø> (ø)
webhook 87.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦠 A note on more complicated changes than adjacent workflows. If that's alright-

Comment on lines +49 to +57
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"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👾 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",

Copy link
Copy Markdown
Contributor

@srtaalej srtaalej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm ⭐

@zimeg
Copy link
Copy Markdown
Member Author

zimeg commented Apr 27, 2026

@srtaalej Woot! Let's continue toward a faster release process and smoother non-releases adjacent. I will merge this.

@zimeg zimeg merged commit 4882606 into main Apr 27, 2026
12 checks passed
@zimeg zimeg deleted the ci/skip-publish-if-released branch April 27, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants