Repository navigation
Conversation
Releases are cut by hand today: `rake release` pushes the gem with the maintainer's local RubyGems credentials, and a tag-triggered workflow creates the GitHub Release afterwards. ruby-gem-release moves publication into one manual workflow dispatch that authenticates with RubyGems Trusted Publishing, so no API key is stored in the repository or on a laptop. The same run updates the changelog, tags the release, creates the GitHub Release, and opens the next development version. The tag-triggered workflow is replaced because the new flow pushes the tag itself, and both would create the same GitHub Release. Local `rake release` now points to the workflow, so the gem cannot be published around it. The release tasks register only on Ruby 3.3+, so the Ruby 3.1 and 3.2 CI jobs still install the bundle.
The input declares the owner of a gem on its first publication. grape-swagger already exists on RubyGems and its owners are set, so the input has no effect and only adds a field to the dispatch form.
Member
|
Look good! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Releasing grape-swagger currently means pushing the gem from a maintainer's machine and then relying on a tag-triggered workflow that only creates the GitHub Release. This change moves the whole release into one manual run of the Release workflow, which publishes the gem through RubyGems Trusted Publishing, updates the changelog, tags the release, and prepares the next version. Release notes keep the changelog format the project already uses, so contributors keep writing them the same way.
Root cause
The release steps are split across a local command and a tag-triggered workflow, and nothing checks that they happen in order. Publishing depends on the maintainer's local RubyGems credentials, and the version bump, changelog heading, and tag are done by hand. A missed step leaves the tag, the changelog, the gem, and the GitHub Release out of sync.
What changes
rake releaselocally now stops with a message that points to the workflow, so the gem cannot be published from a laptop.Drawbacks
dblock/ruby-gem-releasev0.6.0. Upgrading it means upgrading the gem and the pin together.releaseenvironment in GitHub. The first run also needs the numeric RubyGems account ID, which is passed asrubygems-owner.master.Alternatives considered
rake releaseand the tag workflow. This is the status quo. It keeps the manual steps and the local credentials that this change removes.