Skip to content

Add OIDC-based release workflow on tag push#22

Merged
oskgu360 merged 4 commits into
mainfrom
release-workflow-oidc
Apr 30, 2026
Merged

Add OIDC-based release workflow on tag push#22
oskgu360 merged 4 commits into
mainfrom
release-workflow-oidc

Conversation

@oskgu360
Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/workflows/release.yml triggered on v* tag pushes
  • Uses rubygems/release-gem@v1 which performs OIDC token exchange with rubygems.org, builds the gem, and pushes it — no API key in repo secrets
  • Replaces the local rake release flow once the rubygems.org trusted-publisher config is in place

Manual setup required before this works

  • On rubygems.org → sparoid gem → Trusted publishers → Add GitHub Actions publisher with:
    • Owner: 84codes
    • Repository: sparoid.rb
    • Workflow filename: release.yml
    • Environment: (leave blank unless we add one)
  • Disable MFA-on-push for the gem, OR keep it — trusted publishing satisfies the MFA requirement automatically

Test plan

  • After merge + trusted-publisher config: push a v2.1.2 tag and confirm the workflow publishes to rubygems.org

@oskgu360 oskgu360 marked this pull request as ready for review April 30, 2026 07:53
@oskgu360 oskgu360 requested a review from a team as a code owner April 30, 2026 07:53
Comment thread .github/workflows/release.yml Outdated
@oskgu360 oskgu360 force-pushed the release-workflow-oidc branch from f0817b5 to 5fb9219 Compare April 30, 2026 07:55
Releases now run from CI via OIDC, so the local rake release/build/install
tasks are no longer needed. Build locally with 'gem build sparoid.gemspec'
if needed.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions tag-triggered release workflow intended to publish the gem to RubyGems via OIDC trusted publishing, reducing reliance on local rake release and long-lived secrets.

Changes:

  • Add .github/workflows/release.yml to publish on v* tag pushes using rubygems/release-gem@v1 with OIDC.
  • Remove bundler/gem_tasks from Rakefile (dropping Bundler-provided gem tasks like rake install / rake release).
  • Update the CI workflow to use a newer actions/checkout major version.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
Rakefile Removes Bundler gem tasks from the Rake task set.
.github/workflows/release.yml Introduces OIDC-based release workflow triggered by version tags.
.github/workflows/main.yml Updates checkout action used in CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/main.yml Outdated
Comment thread Rakefile
- Indent steps in main.yml under 'steps:' (cosmetic)
- Restore bundler/gem_tasks for 'rake install'; release path is now CI-only
  via the new tag-push workflow
- README: keep 'rake install' as the local install command
@oskgu360 oskgu360 merged commit 0509d2d into main Apr 30, 2026
8 checks passed
@oskgu360 oskgu360 deleted the release-workflow-oidc branch April 30, 2026 08:03
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.

3 participants