Skip to content
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

Streamline gem release with bundler gem task release override #41

Merged
merged 6 commits into from
May 29, 2024

Conversation

darronschall
Copy link
Contributor

Override default gem release task with our own to customize behavior to make releasing as simple and straightforward as possible.

We don't want the release:rubygem_push task to execute at all, even accidentally, since #31 publishes the gem automatically with GitHub as a trusted publisher. (Previously we used gem_push=no bundle exec rake release to release without the gem push, but that's easy to forget).

Since we're overriding release, we also use it to automate creating a GitHub release. No more having to manually run the command and edit release notes, etc.

This will convert a string into an URL HREF anchor. Specifically, we anticipate using this for headings in GitHub markdown files to construct links to those headings.
Requires installing the `gh` CLI. Gets the latest release from GitHub and outputs the version to STDOUT.
@darronschall darronschall force-pushed the streamline-release-task branch from 0e44c45 to 613a021 Compare May 28, 2024 20:18
@darronschall darronschall disabled auto-merge May 28, 2024 20:21
Leverages the `gh` CLI to create a release. This uses the same command that we specified in the README for releasing, but programmatically determines the version to specify and automatically crafts the proper release notes (linking to the CHANGELOG and the diff view).
We don't want the `release:rubygem_push` task to execute at all. Previously we used `gem_push=no bundle exec rake release` for this.. but since we're customize `release` to _also_ create a GitHub release, let's just remove the RubyGem push to it will never accidentally trigger if someone forgets the `gem_push=no` ENV var.
Our `rake release` task override does everything we need for release now. There are no more manual steps.
@darronschall darronschall enabled auto-merge May 28, 2024 20:22
@darronschall darronschall force-pushed the streamline-release-task branch from 613a021 to 7ed83a3 Compare May 28, 2024 20:23
@darronschall darronschall merged commit 891adce into main May 29, 2024
5 checks passed
@darronschall darronschall deleted the streamline-release-task branch May 29, 2024 13:26
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.

2 participants