diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87492eb..0b32458 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ '3.0' ] + ruby: [ '3.2' ] steps: - name: Checkout the code @@ -38,18 +38,12 @@ jobs: fail-fast: false matrix: activerecord: [ '6.1', '7.0', '7.1', '7.2', '8.0' ] - ruby: [ '3.0', '3.1', '3.2', '3.3', '3.4' ] + ruby: [ '3.2', '3.3', '3.4' ] exclude: - activerecord: '6.1' ruby: '3.4' - activerecord: '7.0' ruby: '3.4' - - activerecord: '7.2' - ruby: '3.0' - - activerecord: '8.0' - ruby: '3.0' - - activerecord: '8.0' - ruby: '3.1' timeout-minutes: 10 needs: - lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..dc3588d --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/.rubocop.yml b/.rubocop.yml index a95a9c2..84a7b28 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,8 +1,11 @@ inherit_gem: ezcater_rubocop: conf/rubocop_gem.yml +plugins: + - rubocop-capybara + AllCops: - TargetRubyVersion: 3.0 + TargetRubyVersion: 3.2 SuggestExtensions: false Naming/FileName: diff --git a/CHANGELOG.md b/CHANGELOG.md index a1ec6db..9cef534 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # activerecord-postgres_pub_sub +## v3.3.0 +- Remove support for Ruby 3.0 and 3.1 +- Switch to using RubyGems trusted publishing instead of manual releases + ## v3.2.0 - Add support for ActiveRecord 8.0 - Add support for Ruby 3.4 diff --git a/README.md b/README.md index 71be130..997f5e8 100644 --- a/README.md +++ b/README.md @@ -94,9 +94,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 diff --git a/activerecord-postgres_pub_sub.gemspec b/activerecord-postgres_pub_sub.gemspec index 15162d7..76efbaa 100644 --- a/activerecord-postgres_pub_sub.gemspec +++ b/activerecord-postgres_pub_sub.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.bindir = "bin" spec.executables = [] spec.require_paths = ["lib"] - spec.required_ruby_version = ">= 3.0.0" + spec.required_ruby_version = ">= 3.2.0" spec.add_runtime_dependency "activerecord", "> 6.0", "< 8.1" spec.add_runtime_dependency "pg", "~> 1.1" @@ -45,7 +45,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency "bundler", "~> 2.2" spec.add_development_dependency "database_cleaner" spec.add_development_dependency "ezcater_matchers" - spec.add_development_dependency "ezcater_rubocop", "~> 6.1.0" + spec.add_development_dependency "ezcater_rubocop", "~> 9.0.0" spec.add_development_dependency "overcommit" spec.add_development_dependency "rake", "~> 13.1" spec.add_development_dependency "rspec", "~> 3.4" diff --git a/lib/activerecord/postgres_pub_sub/version.rb b/lib/activerecord/postgres_pub_sub/version.rb index 5ec5a49..72b61b7 100644 --- a/lib/activerecord/postgres_pub_sub/version.rb +++ b/lib/activerecord/postgres_pub_sub/version.rb @@ -2,6 +2,6 @@ module ActiveRecord module PostgresPubSub - VERSION = "3.2.0" + VERSION = "3.3.0" end end