Skip to content

Trusted publishing workflows#3680

Merged
kddnewton merged 4 commits into
ruby:mainfrom
tenderlove:trusted-publishers
Oct 16, 2025
Merged

Trusted publishing workflows#3680
kddnewton merged 4 commits into
ruby:mainfrom
tenderlove:trusted-publishers

Conversation

@tenderlove

@tenderlove tenderlove commented Oct 15, 2025

Copy link
Copy Markdown
Member

I'm working on adding trusted publishing workflows so we can automate gem / crate / npm package releases. Once we get this working correctly, we can simply push a tag to GitHub, and all of the packages will be released automatically.

The plan is to add one workflow per publisher.

  • RubyGems workflow
  • crates.io workflow
  • npmjs workflow

I set up the RubyGems workflow based on other gems that we publish.

I'm less confident about the other workflows, but I used this documentation for crates.io as well as this documentation for npm.

I based the crates workflow and the npm workflow off of their respective CI workflows, but I'd really appreciate reviews from other folks. Once we have something to release, we can test these workflows. 😄

@tenderlove
tenderlove marked this pull request as ready for review October 15, 2025 00:23
@tenderlove
tenderlove requested a review from kddnewton October 15, 2025 00:23

@kddnewton kddnewton left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This all looks good. I put a couple of comments on here for things that I saw, but obviously we won't know until we attempt to publish something.

Comment thread .github/workflows/publish-crate.yml Outdated
Comment thread .github/workflows/publish-crate.yml Outdated
Comment thread .github/workflows/publish-crate.yml Outdated
path: |
~/.cargo/registry
~/.cargo/git
target

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this should be rust/target, since it builds in a subdirectory

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I got this from here. Should it also change? Or is this somehow different?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I guess since I removed caching, this doesn't matter. Though I still wonder about the other workflow pointing at the right location.

Comment thread .github/workflows/publish-crate.yml Outdated
Comment thread .github/workflows/publish-gem.yml Outdated
Comment thread .github/workflows/publish-gem.yml Outdated
Comment thread .github/workflows/publish-gem.yml Outdated
Comment thread .github/workflows/publish-crate.yml Outdated
Comment thread .github/workflows/publish-crate.yml Outdated
Comment thread .github/workflows/publish-crate.yml Outdated
Comment thread .github/workflows/publish-gem.yml Outdated
@Earlopain

Copy link
Copy Markdown
Collaborator

Oh, for the gem you definitly need some setup on rubygems.org for it to work if you didn't do that already: https://guides.rubygems.org/trusted-publishing/adding-a-publisher/

@tenderlove

Copy link
Copy Markdown
Member Author

Oh, for the gem you definitly need some setup on rubygems.org for it to work if you didn't do that already

Ya, I've already set this up with crates.io, npmjs, and RubyGems.org. Just need to get the workflow files in shape 😄

@tenderlove
tenderlove force-pushed the trusted-publishers branch 4 times, most recently from 4fb0710 to ed3bec4 Compare October 15, 2025 20:48
@tenderlove

Copy link
Copy Markdown
Member Author

I think I've addressed most of the feedback. Please take another look! 🙇

@kddnewton
kddnewton merged commit 8e88590 into ruby:main Oct 16, 2025
60 checks passed
@Earlopain

Copy link
Copy Markdown
Collaborator

🤞

@tenderlove tenderlove self-assigned this Oct 16, 2025
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