Skip to content

Commit b67442b

Browse files
authored
Merge pull request #7 from contentstack/gem-release-github-work-flow
GitHub Workflow for Automated Gem Releases
2 parents 9cfdb15 + 92c491e commit b67442b

2 files changed

Lines changed: 54 additions & 18 deletions

File tree

.github/workflows/release-gem.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Ruby Gem
2+
3+
on:
4+
release:
5+
types: [created]
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+
- name: Set up Ruby 2.6
18+
uses: actions/setup-ruby@v1
19+
with:
20+
ruby-version: 2.6.x
21+
22+
- name: Publish to RubyGems
23+
run: |
24+
mkdir -p $HOME/.gem
25+
touch $HOME/.gem/credentials
26+
chmod 0600 $HOME/.gem/credentials
27+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
28+
gem build *.gemspec
29+
gem push *.gem
30+
env:
31+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"

Gemfile.lock

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,61 +8,66 @@ PATH
88
GEM
99
remote: https://rubygems.org/
1010
specs:
11-
activesupport (6.1.5)
11+
activesupport (6.1.7)
1212
concurrent-ruby (~> 1.0, >= 1.0.2)
1313
i18n (>= 1.6, < 2)
1414
minitest (>= 5.1)
1515
tzinfo (~> 2.0)
1616
zeitwerk (~> 2.3)
17-
addressable (2.8.0)
18-
public_suffix (>= 2.0.2, < 5.0)
17+
addressable (2.8.1)
18+
public_suffix (>= 2.0.2, < 6.0)
1919
concurrent-ruby (1.1.10)
2020
crack (0.4.5)
2121
rexml
22-
diff-lcs (1.4.4)
22+
diff-lcs (1.5.0)
2323
docile (1.4.0)
2424
hashdiff (1.0.1)
25-
i18n (1.10.0)
25+
i18n (1.12.0)
2626
concurrent-ruby (~> 1.0)
2727
mini_portile2 (2.8.0)
28-
minitest (5.15.0)
29-
nokogiri (1.13.4)
28+
minitest (5.16.3)
29+
nokogiri (1.13.9)
3030
mini_portile2 (~> 2.8.0)
3131
racc (~> 1.4)
32-
public_suffix (4.0.7)
32+
nokogiri (1.13.9-x64-mingw32)
33+
racc (~> 1.4)
34+
public_suffix (5.0.0)
3335
racc (1.6.0)
34-
rake (13.0.3)
36+
rake (13.0.6)
3537
rexml (3.2.5)
3638
rspec (3.10.0)
3739
rspec-core (~> 3.10.0)
3840
rspec-expectations (~> 3.10.0)
3941
rspec-mocks (~> 3.10.0)
40-
rspec-core (3.10.1)
42+
rspec-core (3.10.2)
4143
rspec-support (~> 3.10.0)
42-
rspec-expectations (3.10.1)
44+
rspec-expectations (3.10.2)
4345
diff-lcs (>= 1.2.0, < 2.0)
4446
rspec-support (~> 3.10.0)
45-
rspec-mocks (3.10.2)
47+
rspec-mocks (3.10.3)
4648
diff-lcs (>= 1.2.0, < 2.0)
4749
rspec-support (~> 3.10.0)
48-
rspec-support (3.10.2)
50+
rspec-support (3.10.3)
4951
simplecov (0.21.2)
5052
docile (~> 1.1)
5153
simplecov-html (~> 0.11)
5254
simplecov_json_formatter (~> 0.1)
5355
simplecov-html (0.12.3)
54-
simplecov_json_formatter (0.1.3)
55-
tzinfo (2.0.4)
56+
simplecov_json_formatter (0.1.4)
57+
tzinfo (2.0.5)
5658
concurrent-ruby (~> 1.0)
5759
webmock (3.11.3)
5860
addressable (>= 2.3.6)
5961
crack (>= 0.3.2)
6062
hashdiff (>= 0.4.0, < 2.0.0)
61-
yard (0.9.26)
62-
zeitwerk (2.5.4)
63+
webrick (1.7.0)
64+
yard (0.9.28)
65+
webrick (~> 1.7.0)
66+
zeitwerk (2.6.6)
6367

6468
PLATFORMS
6569
ruby
70+
x64-mingw32
6671

6772
DEPENDENCIES
6873
contentstack_utils!
@@ -73,4 +78,4 @@ DEPENDENCIES
7378
yard (~> 0.9.26)
7479

7580
BUNDLED WITH
76-
2.2.7
81+
2.3.13

0 commit comments

Comments
 (0)