File tree Expand file tree Collapse file tree 4 files changed +42
-9
lines changed Expand file tree Collapse file tree 4 files changed +42
-9
lines changed Original file line number Diff line number Diff line change 1- name : Publish Gem
1+ name : Publish to RubyGems.org
22
33on :
44 push :
5- tags : v*
5+ branches : main
6+ paths : lib/migration_tools/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+
24+ - name : Install dependencies
25+ run : bundle install
26+ - uses : rubygems/release-gem@v1
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ The names of the possible groups are predefined to avoid turning this solution i
3030
3131* change* this is a special group that you run whenever you want to change DB data which you'd otherwise do in script/console
3232
33-
3433## Commands
3534
3635The list commands
@@ -54,6 +53,21 @@ The group commands
5453```
5554Note that rake db: migrate is entirely unaffected by this.
5655
56+ ### Releasing a new version
57+ A new version is published to RubyGems.org every time a change to ` version.rb ` is pushed to the ` main ` branch.
58+ In short, follow these steps:
59+ 1 . Update ` version.rb ` ,
60+ 2 . update version in all ` Gemfile.lock ` files,
61+ 3 . merge this change into ` main ` , and
62+ 4 . look at [ the action] ( https://github.com/zendesk/migration_tools/actions/workflows/publish.yml ) for output.
63+
64+ To create a pre-release from a non-main branch:
65+ 1 . change the version in ` version.rb ` to something like ` 1.2.0.pre.1 ` or ` 2.0.0.beta.2 ` ,
66+ 2 . push this change to your branch,
67+ 3 . go to [ Actions → “Publish to RubyGems.org” on GitHub] ( https://github.com/zendesk/migration_tools/actions/workflows/publish.yml ) ,
68+ 4 . click the “Run workflow” button,
69+ 5 . pick your branch from a dropdown.
70+
5771## License
5872
5973Copyright 2015 Zendesk
Original file line number Diff line number Diff line change 1+ module MigrationTools
2+ VERSION = "1.10.0"
3+ end
Original file line number Diff line number Diff line change 1- Gem ::Specification . new "migration_tools" , "1.10.0" do |s |
1+ require_relative "lib/migration_tools/version"
2+
3+ Gem ::Specification . new "migration_tools" , MigrationTools ::VERSION do |s |
24 s . description = "Rake tasks for Rails that add groups to migrations"
35 s . summary = "Encourage migrations that do not require downtime"
46 s . homepage = "https://github.com/zendesk/migration_tools"
You can’t perform that action at this time.
0 commit comments