-
Notifications
You must be signed in to change notification settings - Fork 170
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
Set up automatic publishing to Github and Rubygems #275
Conversation
.github/workflows/gem-push.yml
Outdated
env: | ||
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" | ||
OWNER: ${{ github.repository_owner }} | ||
- name: Publish to RubyGems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there going to be cases where we only want to publish to github? When would we want to publish to rubygems and github?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumes we'll just publish everything to both, as a redundancy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a lot of these gems though we explicitly DON'T want them to be public right? otherwise we wouldn't need the private github repo. I'd prefer renaming this workflow to something that makes that a lot more obvious or just not include the public aspect at all until we have a usecase for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github Packages follows the repo's privacy settings. Since this is a public repo the Github package will also be public. Not strictly necessary but might be nice to have
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay so this is for repos like amountable that are public? I would prefer that we make that more explicit in the workflow name otherwise I think someone is going to make a mistake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to clarify. We can also guard against accidental publishes by whitelisting allowed_push_host
in a gemspec's metadata, which is more resilient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes!
No description provided.