Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Trusting Publishing (OIDC) to release gem #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
workflow_dispatch: # allow repo collaborators to publish gem

permissions:
contents: write # required for `rake release` to push the release tag
id-token: write # required for workflow to publish gem

jobs:
package-linting:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# required to run `rake release`.
- name: Setup Ruby and install dependencies
uses: ruby/setup-ruby@v1
with:
# setup-ruby implicitly uses .ruby-version
bundler-cache: true

# Run `rake release` to create git tag and push to repository based on `lib/version.rb`.
# Then publish the new gem via trusted publishing
# Read more on https://guides.rubygems.org/trusted-publishing/releasing-gems/
- uses: rubygems/release-gem@v1