File tree Expand file tree Collapse file tree 3 files changed +37
-10
lines changed Expand file tree Collapse file tree 3 files changed +37
-10
lines changed Original file line number Diff line number Diff line change 1- name : Publish public gem
1+ name : Publish to RubyGems.org
22
33on :
44 push :
5- tags : v*
5+ branches : main
6+ paths : lib/phenix/version.rb
7+ workflow_dispatch :
68
79jobs :
8- call-workflow :
9- uses : zendesk/gw/.github/workflows/ruby-gem-publication.yml@main
10- secrets :
11- RUBY_GEMS_API_KEY : ${{ secrets.RUBY_GEMS_API_KEY }}
12- RUBY_GEMS_TOTP_DEVICE : ${{ secrets.RUBY_GEMS_TOTP_DEVICE }}
10+ publish :
11+ runs-on : ubuntu-latest
12+ environment : rubygems-publish
13+ if : github.repository_owner == 'zendesk'
14+ permissions :
15+ id-token : write
16+ contents : write
17+ steps :
18+ - uses : actions/checkout@v4
19+ - name : Set up Ruby
20+ uses : ruby/setup-ruby@v1
21+ with :
22+ bundler-cache : false
23+ ruby-version : " 3.4"
24+ - name : Install dependencies
25+ run : bundle install
26+ - uses : rubygems/release-gem@v1
Original file line number Diff line number Diff line change @@ -41,13 +41,27 @@ Or install it yourself as:
4141 end
4242```
4343
44-
4544## How do I run tests?
4645
4746` bundle exec rspec `
4847This will assume that your DB is accessible via localhost for root with no password.
4948For a different configuration, you can use the MYSQL_URL environment variable (see test/complex_database.yml).
5049
50+ ### Releasing a new version
51+ A new version is published to RubyGems.org every time a change to ` version.rb ` is pushed to the ` main ` branch.
52+ In short, follow these steps:
53+ 1 . Update ` version.rb ` ,
54+ 2 . update version in all ` Gemfile.lock ` files,
55+ 3 . merge this change into ` main ` , and
56+ 4 . look at [ the action] ( https://github.com/zendesk/phenix/actions/workflows/publish.yml ) for output.
57+
58+ To create a pre-release from a non-main branch:
59+ 1 . change the version in ` version.rb ` to something like ` 1.2.0.pre.1 ` or ` 2.0.0.beta.2 ` ,
60+ 2 . push this change to your branch,
61+ 3 . go to [ Actions → “Publish to RubyGems.org” on GitHub] ( https://github.com/zendesk/phenix/actions/workflows/publish.yml ) ,
62+ 4 . click the “Run workflow” button,
63+ 5 . pick your branch from a dropdown.
64+
5165## Contributing
5266
5367Bug reports and pull requests are welcome on GitHub at https://github.com/zendesk/phenix .
Original file line number Diff line number Diff line change 1+ require 'bundler/setup'
12require 'bundler/gem_tasks'
23require 'rspec/core/rake_task'
34
4- ENV [ "gem_push" ] = "false"
5-
65RSpec ::Core ::RakeTask . new ( :spec )
76
87task default : :spec
You can’t perform that action at this time.
0 commit comments