File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+ on :
3+ push :
4+ tags :
5+ - ' *.*.*'
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ name : Build and Release
11+ runs-on : ubuntu-latest
12+ permissions :
13+ packages : write
14+ contents : read
15+ steps :
16+ - uses : actions/checkout@v4
17+ - name : Set up Ruby
18+ uses : ruby/setup-ruby@v1
19+ with :
20+ ruby-version : ' 2.6'
21+ - run : bundle install
22+
23+ - name : Publish to GPR
24+ env :
25+ GEM_HOST_API_KEY : " Bearer ${{secrets.GITHUB_TOKEN}}"
26+ run : |
27+ mkdir -p $HOME/.gem
28+ touch $HOME/.gem/credentials
29+ chmod 0600 $HOME/.gem/credentials
30+ printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
31+ gem build *.gemspec
32+ if [ ${{ github.ref_type }} == "tag" ]; then
33+ gem push --verbose \
34+ --key github \
35+ --host https://rubygems.pkg.github.com/${{ github.repository_owner }} \
36+ *.gem
37+ fi
38+ - name : Upload gem as action artifact
39+ uses : actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
40+ if : ${{ always() }}
41+ with :
42+ path : *.gem
You can’t perform that action at this time.
0 commit comments