File tree Expand file tree Collapse file tree 2 files changed +50
-5
lines changed
Expand file tree Collapse file tree 2 files changed +50
-5
lines changed Original file line number Diff line number Diff line change 11name : Build
2- on : [ push, pull_request ]
2+ on : [ push, pull_request, workflow_dispatch ]
33jobs :
44 test :
55 strategy :
66 fail-fast : false
77 matrix :
88 os : [ ubuntu-latest, macos-latest ]
9- ruby : [ '2.7 ', '3.0 ' ]
9+ ruby : [ '3.3 ', '3.4 ' ]
1010 runs-on : ${{ matrix.os }}
1111
1212 steps :
13- - uses : actions/checkout@v2
14- - uses : ruby/setup-ruby@v1
13+ - name : Check out repository
14+ uses : actions/checkout@v3
15+
16+ - name : Set up Ruby
17+ uses : ruby/setup-ruby@v1
1518 with :
1619 ruby-version : ${{ matrix.ruby }}
1720 bundler-cache : true # runs 'bundle install' and caches installed gems automatically
18- - run : bundle exec rake
21+
22+ - name : Run checks
23+ run : bundle exec rake
24+
25+ - name : Upload artifacts
26+ if : ${{ always() }}
27+ uses : actions/upload-artifact@v4
28+ with :
29+ name : artifacts-${{ matrix.ruby }}-${{ matrix.os }}
30+ path : artifacts/**
Original file line number Diff line number Diff line change 1+ name : Ruby Gem
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ build :
9+ name : Build + Publish
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+ packages : write
14+
15+ steps :
16+ - uses : actions/checkout@v3
17+
18+ - name : Set up Ruby
19+ uses : ruby/setup-ruby@v1
20+ with :
21+ ruby-version : ' 3.3'
22+ bundler-cache : true
23+
24+ - name : Publish to RubyGems
25+ run : |
26+ mkdir -p $HOME/.gem
27+ touch $HOME/.gem/credentials
28+ chmod 0600 $HOME/.gem/credentials
29+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
30+ gem build *.gemspec
31+ gem push *.gem
32+ env :
33+ GEM_HOST_API_KEY : " ${{secrets.RUBYGEMS_AUTH_TOKEN}}"
You can’t perform that action at this time.
0 commit comments