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+ on :
2+ release :
3+ types : [published]
4+ workflow_dispatch :
5+ inputs :
6+ tag :
7+ description : " Release tag to publish (e.g. v0.6.5)"
8+ required : true
9+ type : string
10+
11+ name : Publish Gem
12+ permissions :
13+ contents : read
14+ jobs :
15+ gem-release :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Checkout Repository
19+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
20+ with :
21+ ref : ${{ github.event.release.tag_name || inputs.tag }}
22+
23+ - uses : ruby/setup-ruby@v1
24+ - run : bundle install
25+
26+ - name : Release Gem
27+ run : |
28+ bundle config unset deployment
29+ mkdir -p $HOME/.gem
30+ touch $HOME/.gem/credentials
31+ chmod 0600 $HOME/.gem/credentials
32+ printf -- "---\n:rubygems_api_key: ${RUBY_GEM_API_TOKEN}\n" > $HOME/.gem/credentials
33+ gem build *.gemspec
34+ gem push *.gem
35+ env :
36+ RUBY_GEM_API_TOKEN : " ${{secrets.RUBY_GEM_API_TOKEN}}"
Original file line number Diff line number Diff line change 1717 token : ${{ secrets.RELEASE_PLEASE_ACTION_TOKEN }}
1818 config-file : release-please-config.json
1919 manifest-file : .release-please-manifest.json
20- outputs :
21- release_created : ${{ steps.release.outputs.release_created }}
22- release_tag_name : ${{ steps.release.outputs.tag_name }}
23-
24- gem-release :
25- needs : release-please
26- runs-on : ubuntu-latest
27- if : ${{ needs.release-please.outputs.release_created }}
28- steps :
29- # The logic below handles the npm publication:
30- - name : Checkout Repository
31- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
32- with :
33- ref : ${{ needs.release-please.outputs.release_tag_name }}
34-
35- # Set up Ruby if a release can be created.
36- - uses : ruby/setup-ruby@v1
37- - run : bundle install
38-
39- - name : Release Gem
40- run : |
41- gem install bundler
42- bundle config unset deployment
43- bundle install
44- mkdir -p $HOME/.gem
45- touch $HOME/.gem/credentials
46- chmod 0600 $HOME/.gem/credentials
47- printf -- "---\n:rubygems_api_key: ${RUBY_GEM_API_TOKEN}\n" > $HOME/.gem/credentials
48- gem build *.gemspec
49- gem push *.gem
50- env :
51- RUBY_GEM_API_TOKEN : " ${{secrets.RUBY_GEM_API_TOKEN}}"
You can’t perform that action at this time.
0 commit comments