Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
# We only care about rubocop against the latest ruby
ruby: ['3.2.2']
ruby: ['3.4.4']

steps:
- name: Checkout the code
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ['2.7.8', '3.0.6', '3.1.4', '3.2.2']
ruby: ['3.2.8', '3.3.8', '3.4.4']

steps:
- name: Checkout the code
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release Gem
on: workflow_dispatch

jobs:
push:
name: Push gem to RubyGems.org
runs-on: ubuntu-latest

permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag

steps:
# Set up
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby

# Release
- uses: rubygems/release-gem@v1
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
inherit_gem:
ezcater_rubocop: conf/rubocop_gem.yml

plugins:
- rubocop-capybara

AllCops:
TargetRubyVersion: 3.2
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# required_env_fetcher

## v0.x.x
- Remove support for < Ruby 3.2
- Switch to using RubyGems trusted publishing instead of manual releases

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I do not plan on releasing a new version for this change. Given that the gem hasn't been updated in > 2 years, we may never have to update it again.

## v0.1.0
- Initial version
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`.

To release a new version, update the version number in `version.rb`, and then
run `bundle exec rake release`, which will create a git tag for the version,
push git commits and tags, and push the `.gem` file to
[rubygems.org](https://rubygems.org)
To release a new version, first ensure that the CHANGELOG.md and `version.rb` files are updated. In the
GitHub UI for this repository, navigate to `Actions -> Release Gem` and click `Run workflow`. Select
the branch you intend to release (most likely `main`). The action will create and push a git tag then
release the new version to Rubygems.org using the [trusted publishing](https://guides.rubygems.org/trusted-publishing/)
feature.
.

## Contributing
Expand Down
6 changes: 3 additions & 3 deletions required_env_fetcher.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
# This is to match inherited settings from ezcater_rubocop which we
# should probably update in a separate PR
spec.required_ruby_version = ">= 2.6"
spec.required_ruby_version = ">= 3.2"

spec.add_development_dependency "bundler", "~> 2.4.19"
spec.add_development_dependency "bundler", "~> 2.6.9"

spec.add_development_dependency "climate_control"
spec.add_development_dependency "ezcater_rubocop", "~> 6.0.2"
spec.add_development_dependency "ezcater_rubocop", "~> 9.0.0"
spec.add_development_dependency "overcommit"
spec.add_development_dependency "rake", "~> 13.0.6"
spec.add_development_dependency "rspec", "~> 3.4"
Expand Down