Repository navigation
Conversation
28eb7b2 to
dc1808b
Compare
|
@ericproulx this automates Grape releases, would need some 1-time setup in GitHub and Rubygems for trusted publisher (copilot can do it for you), see above |
|
@dblock Thanks for this. Before we do the one-time setup, three things would make the first run go wrong, plus a security ask. 1. Master's protection would reject the release push, after 2. Changelog dates. Intridea writes 3. The next version should bump minor, not patch. class MinorVersion < RubyGemRelease::Version::RubyConstant
def increment!(from: read) = super(part: :minor, from:)
endThe spec pins the patch bump today (4.2.9 → 4.2.10). A CHANGELOG assertion next to the README ones would have caught 2 and 3. 4. Security. Everything runs in one job holding
Nits
The fixture's environment isolation ( |
ad1c0f5 to
48baed1
Compare
Danger ReportNo issues found. |
48baed1 to
e1f6c05
Compare
|
Thanks @ericproulx, this was a thorough review!
Nits. Bundler's Written by an AI (Claude) on behalf of @dblock. |
|
@dblock Thanks for working through all of that so quickly. One more: could That needs a With that input, the Grape side would be:
|
|
@dblock Pinning the reusable workflow by SHA freezes its file, but not the actions it uses. At To be fair, Grape's own workflows weren't pinned either. #3088 fixes that. |
|
A follow-up, @ericproulx: these are now merged into ruby-gem-release and will be in 0.8.0, which I'll switch this PR to once it's released.
Written by an AI (Claude) on behalf of @dblock. |
e1f6c05 to
9e6bc75
Compare
|
Good catch, thanks @ericproulx! dblock/ruby-gem-release#88 pins every action in the reusable workflow, the composite action and its own CI to a commit with the version as a comment, adds Dependabot for updates, and adds a spec that fails on unpinned references. Once it's released, I'll repin Grape's Written by an AI (Claude) on behalf of @dblock. |
|
@dblock Thanks for pinning the actions in dblock/ruby-gem-release#88. That's unreleased, though, and this PR still calls v0.7.0, where
The |
9e6bc75 to
76f8768
Compare
|
Thanks @ericproulx! This PR now uses ruby-gem-release
I'll move both pins to the next release, which will include the Anything else is needed for this? Written by an AI (Claude) on behalf of @dblock. |
|
@dblock I guess you'll make a release before merging this PR. The SHA pin are on master instead of the 0.8.0 tag. |
76f8768 to
01594dc
Compare
Done. |
|
What needs to happen after this is merged, before the first automated release (also in RELEASING.md):
The mailing list announcement stays manual. Once releases go through the workflow, maintainers no longer need a RubyGems API key to publish Grape. Written by an AI (Claude) on behalf of @dblock. |
b870ec9 to
c09c443
Compare
|
@dblock The To do the same, with git checkout dblock/automate-gem-release
git fetch upstream master
git rebase upstream/master
git rm .rubocop_todo.yml
git checkout upstream/master -- .rubocop.yml
bundle exec rubocop
git commit --amend --no-edit
git push --force-with-leaseThe |
Preserve Grape's two contribution sections, dashed changelog dates, minor version bumps, and stable/development README updates while delegating publication to the pinned reusable workflow, run in a separate release bundle. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c09c443 to
7f6443f
Compare
|
Thanks @ericproulx, done. I rebased onto master (with #3093), removed This comment was written by an AI (Claude) acting on behalf of @dblock. |
Summary
Automate Grape releases with ruby-gem-release and RubyGems Trusted Publishing. A manually dispatched workflow owns validation, artifact preservation, publication, release commits and tags, GitHub Releases, and the next development iteration, with an optional version override and a
dry-runinput that only checks the release prerequisites.ruby-gem-releaseandcommonmarkerlive ingemfiles/release.gemfile, which evaluates the mainGemfile, so contributors and other CI jobs don't install them. The reusable workflow'sgemfile:input runs every release step in that bundle. The Rakefile installs the release tasks only whenruby-gem-releaseis available, andrake releasestops and points to RELEASING.md in every bundle.v0.9.0commit (fc9b267), which pins its own actions by commit. The release job alone getscontents: writeandid-token: write.date_format: '%Y-%m-%d'), and drops an empty section from a release (sections: %w[Features Fixes]). The next development version bumps minor (next_version: :minor). README lifecycle hooks update the Stable Release section.spec/integration/ruby_gem_release/release_spec.rbruns the production workflow builder in separate Rake processes with local publication adapters and asserts the full README, CHANGELOG, and version file in both the release tag andmaster. It runs in its owntest.ymljob against the release bundle and is excluded from the main jobs.Required Before the First Release
releaseenvironment with maintainer approval and deployment restricted tomaster.master(it requires 0 approvals, so writers can already merge their own PRs), keeping force-push and deletion blocked, so the release token can push the release commit and tag.grapeRubyGems trusted publisher with repositoryruby-grape/grape, workflowrelease.yml, environmentrelease, and workflow repositorydblock/ruby-gem-release.-f dry-run=trueto verify the environment, trusted publisher, and push permissions.These settings are documented in
RELEASING.md; this PR doesn't change repository protections or RubyGems configuration.Validation
bundle exec rakepasses (RuboCop, 3,320 examples),bundle exec rake buildpasses, and neithercommonmarkernorruby-gem-releaseis installed.BUNDLE_GEMFILE=gemfiles/release.gemfile):bundle exec rspec spec/integration/ruby_gem_releasepasses, including the 4.2.9 → 4.3.0 bump.actionlintpasses forrelease.ymlandtest.yml.No workflow was dispatched, and nothing was published to RubyGems or GitHub.
This description was written by an AI (Claude) acting on behalf of @dblock.