Skip to content

Automate RubyGems releases from version tags - #40

Merged
jclusso merged 1 commit into
masterfrom
release-workflow
Nov 5, 2026
Merged

jclusso merged 1 commit into
masterfrom
release-workflow

Conversation

@jclusso

@jclusso jclusso commented Nov 5, 2026

Copy link
Copy Markdown
Member

Releases were published by hand, so a step like bumping the version or creating the GitHub release could be missed. Running rake release:prepare now checks the branch, tests, and RuboCop before tagging, and pushing the tag publishes to RubyGems through trusted publishing from a release environment that only version tags can deploy to; rubygems_mfa_required keeps any manual push behind 2FA. Before the first release, add a RubyGems trusted publisher for release.yml with environment release.

@jclusso
jclusso requested a review from danarnold as a code owner November 5, 2026 19:25
Copilot AI balanced review requested due to automatic review settings November 5, 2026 19:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The repository snapshot cannot verify that GitHub’s release environment permits only version tags or that RubyGems trusts this repository’s release.yml with environment release.

No open issues 🎉

What changed in this PR

Automates gem releases from version tags, replacing manual publishing with local release checks and a GitHub Actions workflow.

Changes:

  • Adds release:prepare to check branch synchronization, tree cleanliness, tests, and RuboCop before updating the version, committing, and tagging.
  • Adds a tag-triggered workflow that validates the version, runs tests, publishes through RubyGems trusted publishing, and creates a GitHub release.
  • Documents the release process and requires MFA for manual RubyGems publishing.
File Description
README.md Documents release preparation and pushing version tags.
Rakefile Adds release preparation checks and bare-version tagging.
emailable.gemspec Enables RubyGems MFA-required metadata.
.github/​workflows/​release.yml Automates validation, publishing, and GitHub release creation.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The release task must reject existing target tags before modifying or committing the version, otherwise a failed tag command leaves a downgrade commit on master and blocks retries until it is manually undone.

1 open issue

Review effort: Balanced

Comment thread Rakefile Resolved
Releases were published by hand, so a step like bumping the version or
creating the GitHub release could be missed. Pushing a tag made by
`rake release:prepare` now publishes through trusted publishing, and
requiring MFA keeps any manual push behind a 2FA code.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Release-security settings outside the reviewed files still need confirmation: version-tag restrictions on GitHub’s release environment and RubyGems trusted-publisher bindings to this repository, release.yml, and that environment.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@jclusso
jclusso merged commit c10d98b into master Nov 5, 2026
7 of 9 checks passed
@jclusso
jclusso deleted the release-workflow branch November 5, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants