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
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ '3.0' ]
ruby: [ '3.2' ]

steps:
- name: Checkout the code
Expand All @@ -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
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
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no reason we couldn't change this to run on pushes to main in the future. I'd like to see that it works manually first, though.


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
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions activerecord-postgres_pub_sub.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lib/activerecord/postgres_pub_sub/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module ActiveRecord
module PostgresPubSub
VERSION = "3.2.0"
VERSION = "3.3.0"
end
end