Comments (12)
Docs that should be updated if/when changes are made: https://github.com/sinatra/sinatra/blob/main/RELEASING.md
from sinatra.
It is possible to create RubyGems API keys scoped to only pushing a specific gem (https://rubygems.org/profile/api_keys). If "MFA Level" is set to
UI and gem signin
I believe it is possible to push the gem from CI. API keys are personal though, as RubyGems.org does not have the concept of organisations/teams. We would need to maintain some mapping per maintainer in Actions secrets. Could it work?
This may not be compatible with rubygems_mfa_required
https://guides.rubygems.org/mfa-requirement-opt-in/
Maybe a Actions workflow manually triggered (workflow_dispatch
) that takes the OTP as input could work.
from sinatra.
Some more RubyGems.org/MFA links: https://blog.rubygems.org/2022/08/22/mfa-ui-only-removed.html, https://blog.rubygems.org/2022/08/15/requiring-mfa-on-popular-gems.html
from sinatra.
Interesting, Jekyll pushes with https://rubygems.org/profiles/jekyllbot
from sinatra.
Maybe wait for rubygems/rfcs#49
from sinatra.
Maybe wait for rubygems/rfcs#49
The implementation is at rubygems/rubygems.org#3716, sounds like it is pretty close to be merged, I think we can ask to beta test it after that
from sinatra.
This is the action to use https://github.com/rubygems/configure-rubygems-credentials
https://www.youtube.com/watch?v=kaRhg3QDzFY mentions it is possible to reach out to the Bundler team if you want to test this, will do
from sinatra.
https://github.com/svenfuchs/gem-release looks really interesting
from sinatra.
Experimented with the above plugin and the RubyGems OIDC feature (https://rubygems.org/profile/oidc/api_key_roles/) for this dummy gem: https://github.com/spinels/spinels, https://rubygems.org/gems/spinels
Here's the workflow: https://github.com/spinels/spinels/blob/be054df398b3958497d92ba9c910f53f84792286/.github/workflows/release.yml
You can see an example run at https://github.com/spinels/spinels/actions/runs/7076441331/job/19259685180
Creating a release was done with the GitHub CLI: gh workflow run release.yml && sleep 2 && gh run watch --interval 1 --exit-status $(gh run list --workflow=release.yml --limit 1 --json databaseId --jq '.[].databaseId')
Used info from the actions event as the git author info: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address#about-commit-email-addresses. It is possible to become even more fancy with this: https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-on-behalf-of-an-organization
Additional useful link: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#understanding-the-oidc-token
from sinatra.
We still have the protected main branch so we can't use https://github.com/svenfuchs/gem-release to bump the version in git main from actions. Creating the signed git tag (git tag -s
) should still probably happen locally. We could have a workflow triggered when the tag is pushed. The workflow can run bundle exec rake install:all
and the gem push
es. Before that, maintainer will have to open PR with version bump (and changelog update).
from sinatra.
https://blog.rubygems.org/2023/12/14/trusted-publishing.html
from sinatra.
https://blog.rubygems.org/2023/12/14/trusted-publishing.html
Tested that in https://github.com/spinels/slenips. https://rubygems.org/gems/slenips shows under "Pushed By".
There is a difference between "OIDC API Key Roles" and "Trusted Publishers":
yes, they are separate features. api key roles are tied to a user, trusted publishers are tied to a gem
from sinatra.
Related Issues (20)
- Upgrading to 4.0.0 required me to do a new request.body.rewind before a request.body.read HOT 2
- I made a template for Sinatra if you guys wanna include it in examples
- paradise lost, also, stability (GETTING STARTED does NOT) HOT 4
- Segmentation Fault with 4.0.0 HOT 5
- sinatra-contrib tests fails on truffleruby 24.0.0 HOT 6
- Support `Forwarded` header HOT 1
- Default rack-protection reaction `drop_session` harmful? HOT 3
- Some `RoutingTest` fails with rack head (Rack 3.1) HOT 3
- `Rack::Protection::CookieTossing` test fail with Rack 3.1.3 HOT 11
- `Rack::Logger is deprecated and will be removed in Rack 3.2` HOT 1
- `StaticTest#test_handles_valid_byte_ranges_correctly_0` fails with Rack 3.1 HOT 9
- Stop deleting the `content-length` header?
- Test `TestIndifferentHashBasics#test_default_object` fails in ruby-head
- Test `IntegrationTest#test_with_puma_logs_once_in_development_mode_0` failed with jruby HOT 1
- Remove `Sinatra::Cookies` (sinatra-contrib helper)? HOT 1
- AuthenticityToken does not work when configured via "set :protection" HOT 4
- List routes HOT 1
- Expected date for Release containing Rack 3.1 Compatibility?
- Mustermann CPU spike & performance issues HOT 2
- ruby-head failure
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sinatra.