Skip to content

ci: update release candidate in pull request when changes are available - #552

Merged
zimeg merged 7 commits into
mainfrom
zimeg-ci-release-autorc
May 21, 2026
Merged

ci: update release candidate in pull request when changes are available#552
zimeg merged 7 commits into
mainfrom
zimeg-ci-release-autorc

Conversation

@zimeg

@zimegzimeg commented May 18, 2026

Copy link
Copy Markdown
Member

Changelog

N/A - But we hope to continue autogenerated changesets alongside a faster "launch" sequence 🚀

Summary

This PR updates release candidates in pull requests when changes are available 🐙 ✨

Preview

This PR following uses this branch as a base IIRC:

🔗 #553

Notes

  • This moves all terminal commands for a release to GitHub workflows for more simple and confident process. We'll update internal runbooks to create a release from GitHub as well if changes seem alright. I'll leave comments more below!

Requirements

@zimegzimeg added this to the Next Release milestone May 18, 2026
@zimegzimeg self-assigned this May 18, 2026
@zimegzimeg added semver:patch Use on pull requests to describe the release version increment build M-T: Changes to compilation and CI processes labels May 18, 2026
zimegand others added 3 commits May 18, 2026 16:27
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@codecov

codecovBot commented May 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.65%. Comparing base (aad8f88) to head (9c62bf2).

Additional details and impacted files
@@ Coverage Diff @@## main #552 +/- ##
==========================================
- Coverage 71.66% 71.65% -0.01% 
==========================================
Files 226 226 Lines 19115 19115 ==========================================
- Hits 13698 13697 -1 - Misses 4210 4212 +2 + Partials 1207 1206 -1 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zimegzimeg mentioned this pull request May 18, 2026
2 tasks

@zimegzimeg left a comment

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

A few comments 🦑 for the amazing reviewers!

Comment thread.circleci/config.yml
# Note the following _does not change releases or tags_ - it only creates release notes, just like clicking "Generate Release Notes" on the GitHub Releases page.
CHANGELOG=$(curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $GITHUB_RELEASE_TOKEN" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/slackapi/slack-cli/releases/generate-notes -d "{\"tag_name\":\"${TARGET}\",\"target_commitish\":\"${TARGET}\",\"previous_tag_name\":\"${LAST_SEMVER_TAG}\"}" | jq .body)
echo "Will use release notes: ${CHANGELOG}"
BODY+="\"body\":$CHANGELOG}"

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

🧮 note: Some refactoring to make curl statements explicit instead of additive but no change to what's shown AFAICT!

Comment thread.circleci/config.yml
fi
echo "Creating GitHub release for $RELEASE_REF..."
RELEASE_ID=$(curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token $GITHUB_RELEASE_TOKEN" https://api.github.com/repos/slackapi/slack-cli/releases -d "{\"tag_name\":\"${RELEASE_REF}\",\"name\":\"${RELEASE_REF}\",\"target_commitish\":\"${TARGET}\",\"draft\":false,\"prerelease\":${PRERELEASE},\"generate_release_notes\":true}" | jq -r .id)
elif [ "<< parameters.production >>" = "false" ]; then

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

📚 note: We might prefer the more simple "else" here but current changes hope that we generate release notes ourselves to skip this step. The release would be created before this point so we skip to "uploading assets" next

Comment thread.circleci/config.yml
-H "Content-Type: $(file -b --mime-type ${binary})" \
-H "Content-Length: $(wc -c <${binary} | xargs)" \
-T "${binary}" \
"https://uploads.github.com/repos/slackapi/slack-cli/releases/$RELEASE_ID/assets?name=$(basename ${binary})" | cat

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

👁️‍🗨️ note: Formatting change for indentation.

make tag RELEASE_VERSION="$RELEASE_VERSION"
git push origin "HEAD:refs/heads/rc" --force

- name: Create or update release PR

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

📣 note: We have an example of these outputs with #553!

Comment threadMakefile
Comment on lines -106 to -107
# @printf "$(FONT_BOLD)Git Tag$(FONT_RESET)\n"
# git tag v$(RELEASE_VERSION)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

🪓 note: If we're confident on this direction I plan to update runbooks to create the tag separate.

Comment threadMakefile
@printf "$(FONT_BOLD)Creating Branch$(FONT_RESET)\n"
git checkout -b "chore-release-$(RELEASE_VERSION)"
@printf "$(FONT_BOLD)Building CLI$(FONT_RESET)\n"
$(MAKE) build-ci LDFLAGS="-X 'github.com/slackapi/slack-cli/internal/version.Version=v$(RELEASE_VERSION)'"

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

👾 note: We now build as part of this step for confidence that we're generating the latest.

@zimeg
zimeg marked this pull request as ready for review May 21, 2026 22:35
@zimeg
zimeg requested a review from a team as a code ownerMay 21, 2026 22:35

@mwbrooksmwbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

✅ Love the make rc command!

@zimeg

Copy link
Copy Markdown
MemberAuthor

@mwbrooks Much same! I'm excited for what's next 🚀 ✨ So I will merge this PR. Let's check out #553 soon after!

@zimeg
zimeg merged commit dd404fe into mainMay 21, 2026
10 checks passed
@zimeg
zimeg deleted the zimeg-ci-release-autorc branch May 21, 2026 22:44
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildM-T: Changes to compilation and CI processessemver:patchUse on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@zimeg@mwbrooks