File tree Expand file tree Collapse file tree 2 files changed +70
-0
lines changed Expand file tree Collapse file tree 2 files changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches : [ "main" ]
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ lint :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Ruby
19+ uses : ruby/setup-ruby@v1
20+ with :
21+ ruby-version : .ruby-version
22+ bundler-cache : true
23+
24+ - name : Lint code for consistent style
25+ run : bundle exec rubocop -f github
26+
27+ test :
28+ runs-on : ubuntu-latest
29+ strategy :
30+ matrix :
31+ ruby-version : ['3.3', '3.4']
32+
33+ steps :
34+ - name : Checkout code
35+ uses : actions/checkout@v4
36+
37+ - name : Set up Ruby
38+ uses : ruby/setup-ruby@v1
39+ with :
40+ ruby-version : ${{ matrix.ruby-version }}
41+ bundler-cache : true
42+
43+ - name : Run tests
44+ run : bundle exec rake
Original file line number Diff line number Diff line change 1+ name : Push gem
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+
7+ jobs :
8+ push :
9+ name : Push gem to RubyGems.org
10+ runs-on : ubuntu-latest
11+
12+ permissions :
13+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
14+ contents : write # IMPORTANT: this permission is required for `rake release` to push the release tag
15+
16+ steps :
17+ # Set up
18+ - uses : actions/checkout@v4
19+ - name : Set up Ruby
20+ uses : ruby/setup-ruby@v1
21+ with :
22+ bundler-cache : true
23+ ruby-version : ruby
24+
25+ # Release
26+ - uses : rubygems/release-gem@v1
You can’t perform that action at this time.
0 commit comments