rubygems / release-gem

The official GitHub Action for publishing your gem files to RubyGems.org
22 stars 3 forks source link

Support releasing without rake #3

Open ekohl opened 9 months ago

ekohl commented 9 months ago

I appreciate an action is published to make releasing easier. Standardizing the ecosystem is a good thing and I wasn't aware of rubygem-await (but have certainly it the problem it wasn't published before).

With the aim of replacing my release-gem.yml I started to play with this. In a test project I noticed this uses rake release, and then saw it was also documented in the README:

Your project has the bundler release tasks configured

My test project doesn't use rake at all and I'd like it if I didn't need to run bundle install just to publish the gem. My current workflow uses gem build and gem push. Are you open to supporting this way or should I enhance my current workflow to reuse rubygems/configure-rubygems-credentials? (I really appreciate those steps are separated for easier composability).

segiddins commented 9 months ago

I am open to us pointing to a script file in the repo that can run build & push, but since this is such a small action, I do want to keep it focused on the most common way of releasing (which is running rake release)

bastelfreak commented 9 months ago

is that actually the most common way? I package many ruby gems for Arch Linux and the majority of them uses gem build and gem push in a pipeline, not any rake task.

mschwager commented 8 months ago

+1 for not requiring rake-release. By default, that tool attempts to create a git tag and push it. This means it's incompatible with GitHub Actions jobs that only run on tag. In other words, my ideal workflow would be kicking off the gem release job on tag, but rake-release also tries to create a tag, and subsequently fails.

segiddins commented 8 months ago

https://github.com/rubygems/rubygems/blob/072176243027a60e20ffe6976ec59b45bc65f351/bundler/lib/bundler/gem_helper.rb#L76 by default bundler's rake task checks if the tag already exists

mschwager commented 8 months ago

https://github.com/rubygems/rubygems/blob/072176243027a60e20ffe6976ec59b45bc65f351/bundler/lib/bundler/gem_helper.rb#L76 by default bundler's rake task checks if the tag already exists

Ahh, good to know. Although that requires the tag to be formatted like vX.X.X, whereas I usually tag the exact semver like X.X.X. So in that case it fails to detect if the tag already exists 🤷