-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for Trusted Publishing to RubyGems (#1970)
https://blog.rubygems.org/2023/12/14/trusted-publishing.html https://guides.rubygems.org/trusted-publishing/ This makes it possible for anyone who can push a tag to sinatra/sinatra (or access the "Run workflow" button in the Actions UI) to cut a release. Close #1920
- Loading branch information
Showing
3 changed files
with
58 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
id-token: write # for trusted publishing | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
ruby-version: ruby | ||
- uses: rubygems/configure-rubygems-credentials@v1.0.0 | ||
# ensure gems can be built and installed | ||
- run: bundle exec rake install:rack-protection | ||
- run: bundle exec rake install:sinatra | ||
- run: bundle exec rake install:sinatra-contrib | ||
# push gems to rubygems.org | ||
- run: bundle exec rake release:rack-protection | ||
- run: bundle exec rake release:sinatra | ||
- run: bundle exec rake release:sinatra-contrib |
This file contains 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
This file contains 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