File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ publish :
13+ name : Publish to RubyGems
14+ runs-on : ubuntu-latest
15+ environment : release
16+ permissions :
17+ contents : write
18+ id-token : write
19+ steps :
20+ - name : Checkout
21+ uses : actions/checkout@v7
22+ with :
23+ persist-credentials : false
24+ - name : Set up Ruby
25+ uses : ruby/setup-ruby@v1
26+ with :
27+ ruby-version : ' 3.3'
28+ bundler-cache : true
29+ - name : Release gem
30+ uses : rubygems/release-gem@v1
Original file line number Diff line number Diff line change @@ -61,3 +61,21 @@ $ sudo env PATH="$PATH" GEM_HOME="$GEM_HOME" GEM_PATH="$GEM_PATH" \
6161
6262Regenerate the unit with ` --force ` after a Ruby upgrade. See
6363[ docs/systemd.md] ( docs/systemd.md ) for the full guide.
64+
65+ ## Release
66+
67+ Releases use RubyGems [ trusted publishing] ( https://guides.rubygems.org/trusted-publishing ) —
68+ no API tokens. The trusted publisher must be registered for this repo and the
69+ ` release.yml ` workflow on RubyGems.org (a pending publisher becomes a normal
70+ one after its first push). To release:
71+
72+ 1 . Bump the version in ` passenger_datadog.gemspec ` and add a ` CHANGELOG.md ` entry.
73+ 2 . Commit, tag, and push:
74+
75+ ```
76+ $ git tag v2.0.0
77+ $ git push origin v2.0.0
78+ ```
79+
80+ ` .github/workflows/release.yml ` builds the gem and pushes it to RubyGems.org,
81+ authenticating with an OIDC token scoped to this gem.
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ require 'rake'
44require 'rspec/core'
55require 'rspec/core/rake_task'
66require 'rubocop/rake_task'
7+ require 'bundler/gem_tasks'
78
89RSpec ::Core ::RakeTask . new ( :spec )
910
You can’t perform that action at this time.
0 commit comments