Add automated RubyGems/crates.io publishing#694
Conversation
|
Cool with this in theory, i assume i need to input credentials somewhere? |
|
Yeah, the only credential needed is: You actually don't need to set this as a secret, RubyGems says it's fine to expose publicly. |
|
FWIW there are UI settings for both RubyGems and crates.io that you would need to configure (since you're the owner of those published packages); the links above provide more documentation on what to do there. |
|
bumping this! |
|
@ianks another bump. even without setting up OIDC, you can store your rubygems key as a secret in this repo. point is, I think some sort of deploy automation is warranted. |
|
@ianks bumping this since I see you working 😆 basically, the gem release process is tied to you, and only you |
This PR is an attempt to make publishing to RubyGems and crates.io simpler and more secure.
Ultiamtely, both RubyGems and crates.io support Trusted Publishing. The idea is that rather than one individual using their own auth token to publish updates, the GitHub Actions workflow can request a short lived token from the provider, and use that to issue updates. This should make it simpler for newly merged PRs to be released across RubyGems, crates.io, and Dockerhub.
In the new release.yml here, I propose:
prepare, andrelease.prepare: truegem/lib/rb_sys/version.rb, generates a CHANGELOG entry, and opens a PRAfterwards:
release: truepublish_cratesjob triggers after the new release is made. this pushesrb-sys-build, waits for it to be indexed, then pushesrb-sys, to crates.io using OIDCpublish_gempublishes the gem using OIDCThere needs to be some configuration on the RubyGems and crates.io UI settings to "recognize" this workflow as the source of truth, but that ought to be it. This. brings along an audit trail for releases (via the GitHub Actions logs), credential rotation via OIDC, and supply chain security.