Skip to content

Migrate release workflow to use trusted publisher#2535

Merged
st0012 merged 1 commit intomainfrom
trusted-publisher-release
Mar 17, 2026
Merged

Migrate release workflow to use trusted publisher#2535
st0012 merged 1 commit intomainfrom
trusted-publisher-release

Conversation

@st0012
Copy link
Member

@st0012 st0012 commented Mar 16, 2026

Motivation

Replace the current release workflow with the trusted publisher pattern used by other repos like Shopify/spoom and Shopify/rbi. The new workflow publishes the gem to RubyGems.org via OIDC (no API key needed) and then creates a GitHub release.

Implementation

Tests

Replace the GitHub-release-only workflow with the trusted publisher
pattern used by Shopify/spoom and Shopify/rbi. The new workflow
publishes the gem to RubyGems.org via OIDC (no API key needed) and
then creates a GitHub release.

Requires configuring a `release` environment in repo settings and
adding a trusted publisher entry on rubygems.org.
@st0012 st0012 requested a review from a team as a code owner March 16, 2026 22:13
@st0012 st0012 added the chore label Mar 16, 2026

- name: Create GitHub release
run: |
tag_name="$(git describe --tags --abbrev=0)"
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, since this action will be triggered with a tag push, I wonder if there is no way to read the tag that triggered the push instead of trying to find it again in the repository.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, it is actually what we've been using all along: github.ref or github.ref_name

@st0012 st0012 merged commit bb81f14 into main Mar 17, 2026
20 checks passed
@st0012 st0012 deleted the trusted-publisher-release branch March 17, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants