Skip to content

Commit 55df354

Browse files
committed
Adding trusted publishing
1 parent 0078912 commit 55df354

10 files changed

Lines changed: 221 additions & 77 deletions

File tree

.github/workflows/push_gem.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Publish gem to rubygems.org
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- 'lib/*/version.rb'
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
push:
14+
if: github.repository == 'hlascelles/figjam'
15+
runs-on: ubuntu-latest
16+
17+
environment:
18+
name: rubygems.org
19+
url: https://rubygems.org/gems/figjam
20+
21+
permissions:
22+
contents: write
23+
id-token: write
24+
25+
steps:
26+
# Set up
27+
- name: Harden Runner
28+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
29+
with:
30+
egress-policy: audit
31+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32+
- name: Set up Ruby
33+
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0
34+
with:
35+
bundler-cache: true
36+
ruby-version: ruby
37+
38+
# Release
39+
- name: Publish to RubyGems
40+
uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1
41+
42+
- name: Create GitHub release
43+
run: |
44+
tag_name="$(git describe --tags --abbrev=0)"
45+
gh release create "${tag_name}" --verify-tag --draft --generate-notes
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.6.2 (2024-09-10)
2+
3+
- Adding trusted publishing [#216](https://github.com/hlascelles/figjam/pull/216)
4+
15
## 2.0.0 (2025-04-12)
26

37
BREAKING CHANGE:

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
figjam (2.0.0)
4+
figjam (2.0.1)
55
thor (>= 0.14.0, < 2)
66

77
GEM

gemfiles/psych_4.0.gemfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,19 @@ gem "sqlite3", "~> 1.0"
99
gem "rails", "~> 7.0"
1010
gem "psych", "~> 4.0"
1111

12+
group :development, :test do
13+
gem "fasterer"
14+
gem "pry-byebug"
15+
gem "rake"
16+
gem "reek"
17+
gem "rspec"
18+
gem "rubocop"
19+
gem "rubocop-magic_numbers"
20+
gem "rubocop-performance"
21+
gem "rubocop-rails"
22+
gem "rubocop-rake", "> 0.7.0"
23+
gem "rubocop-rspec", "> 3.5.0"
24+
gem "rubocop-thread_safety"
25+
end
26+
1227
gemspec path: "../"

gemfiles/psych_4.0.gemfile.lock

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
figjam (2.0.0)
4+
figjam (2.0.1)
55
thor (>= 0.14.0, < 2)
66

77
GEM
@@ -174,6 +174,8 @@ GEM
174174
reline (>= 0.4.2)
175175
json (2.7.1)
176176
language_server-protocol (3.17.0.3)
177+
lint_roller (1.1.0)
178+
logger (1.7.0)
177179
loofah (2.22.0)
178180
crass (~> 1.0.2)
179181
nokogiri (>= 1.12.0)
@@ -201,9 +203,10 @@ GEM
201203
nokogiri (1.18.7-x86_64-linux-gnu)
202204
racc (~> 1.4)
203205
parallel (1.24.0)
204-
parser (3.3.0.5)
206+
parser (3.3.8.0)
205207
ast (~> 2.4.1)
206208
racc
209+
prism (1.4.0)
207210
pry (0.14.2)
208211
coderay (~> 1.1)
209212
method_source (~> 1.0)
@@ -254,12 +257,13 @@ GEM
254257
rake (13.1.0)
255258
rdoc (6.6.2)
256259
psych (>= 4.0.0)
257-
reek (6.3.0)
258-
dry-schema (~> 1.13.0)
260+
reek (6.5.0)
261+
dry-schema (~> 1.13)
262+
logger (~> 1.6)
259263
parser (~> 3.3.0)
260264
rainbow (>= 2.0, < 4.0)
261265
rexml (~> 3.1)
262-
regexp_parser (2.9.0)
266+
regexp_parser (2.10.0)
263267
reline (0.4.3)
264268
io-console (~> 0.5)
265269
rexml (3.2.6)
@@ -276,32 +280,41 @@ GEM
276280
diff-lcs (>= 1.2.0, < 2.0)
277281
rspec-support (~> 3.13.0)
278282
rspec-support (3.13.1)
279-
rubocop (1.62.1)
283+
rubocop (1.75.8)
280284
json (~> 2.3)
281-
language_server-protocol (>= 3.17.0)
285+
language_server-protocol (~> 3.17.0.2)
286+
lint_roller (~> 1.1.0)
282287
parallel (~> 1.10)
283288
parser (>= 3.3.0.2)
284289
rainbow (>= 2.2.2, < 4.0)
285-
regexp_parser (>= 1.8, < 3.0)
286-
rexml (>= 3.2.5, < 4.0)
287-
rubocop-ast (>= 1.31.1, < 2.0)
290+
regexp_parser (>= 2.9.3, < 3.0)
291+
rubocop-ast (>= 1.44.0, < 2.0)
288292
ruby-progressbar (~> 1.7)
289-
unicode-display_width (>= 2.4.0, < 3.0)
290-
rubocop-ast (1.31.2)
291-
parser (>= 3.3.0.4)
292-
rubocop-capybara (2.20.0)
293-
rubocop (~> 1.41)
294-
rubocop-factory_bot (2.25.1)
295-
rubocop (~> 1.41)
293+
unicode-display_width (>= 2.4.0, < 4.0)
294+
rubocop-ast (1.44.1)
295+
parser (>= 3.3.7.2)
296+
prism (~> 1.4)
297+
rubocop-magic_numbers (0.5.0)
298+
parser
299+
rubocop
296300
rubocop-performance (1.20.2)
297301
rubocop (>= 1.48.1, < 2.0)
298302
rubocop-ast (>= 1.30.0, < 2.0)
299-
rubocop-rake (0.6.0)
300-
rubocop (~> 1.0)
301-
rubocop-rspec (2.27.1)
302-
rubocop (~> 1.40)
303-
rubocop-capybara (~> 2.17)
304-
rubocop-factory_bot (~> 2.22)
303+
rubocop-rails (2.32.0)
304+
activesupport (>= 4.2.0)
305+
lint_roller (~> 1.1)
306+
rack (>= 1.1)
307+
rubocop (>= 1.75.0, < 2.0)
308+
rubocop-ast (>= 1.44.0, < 2.0)
309+
rubocop-rake (0.7.1)
310+
lint_roller (~> 1.1)
311+
rubocop (>= 1.72.1)
312+
rubocop-rspec (3.6.0)
313+
lint_roller (~> 1.1)
314+
rubocop (~> 1.72, >= 1.72.1)
315+
rubocop-thread_safety (0.7.2)
316+
lint_roller (~> 1.1)
317+
rubocop (~> 1.72, >= 1.72.1)
305318
ruby-progressbar (1.13.0)
306319
ruby_parser (3.21.0)
307320
racc (~> 1.5)
@@ -344,9 +357,12 @@ DEPENDENCIES
344357
reek
345358
rspec
346359
rubocop
360+
rubocop-magic_numbers
347361
rubocop-performance
348-
rubocop-rake
349-
rubocop-rspec
362+
rubocop-rails
363+
rubocop-rake (> 0.7.0)
364+
rubocop-rspec (> 3.5.0)
365+
rubocop-thread_safety
350366
sqlite3 (~> 1.0)
351367

352368
BUNDLED WITH

gemfiles/psych_5.0.gemfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,19 @@ gem "sqlite3", "~> 1.0"
99
gem "rails", "~> 7.0"
1010
gem "psych", "~> 5.0"
1111

12+
group :development, :test do
13+
gem "fasterer"
14+
gem "pry-byebug"
15+
gem "rake"
16+
gem "reek"
17+
gem "rspec"
18+
gem "rubocop"
19+
gem "rubocop-magic_numbers"
20+
gem "rubocop-performance"
21+
gem "rubocop-rails"
22+
gem "rubocop-rake", "> 0.7.0"
23+
gem "rubocop-rspec", "> 3.5.0"
24+
gem "rubocop-thread_safety"
25+
end
26+
1227
gemspec path: "../"

gemfiles/psych_5.0.gemfile.lock

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
figjam (2.0.0)
4+
figjam (2.0.1)
55
thor (>= 0.14.0, < 2)
66

77
GEM
@@ -174,6 +174,8 @@ GEM
174174
reline (>= 0.4.2)
175175
json (2.7.1)
176176
language_server-protocol (3.17.0.3)
177+
lint_roller (1.1.0)
178+
logger (1.7.0)
177179
loofah (2.22.0)
178180
crass (~> 1.0.2)
179181
nokogiri (>= 1.12.0)
@@ -201,9 +203,10 @@ GEM
201203
nokogiri (1.18.7-x86_64-linux-gnu)
202204
racc (~> 1.4)
203205
parallel (1.24.0)
204-
parser (3.3.0.5)
206+
parser (3.3.8.0)
205207
ast (~> 2.4.1)
206208
racc
209+
prism (1.4.0)
207210
pry (0.14.2)
208211
coderay (~> 1.1)
209212
method_source (~> 1.0)
@@ -254,12 +257,13 @@ GEM
254257
rake (13.1.0)
255258
rdoc (6.6.2)
256259
psych (>= 4.0.0)
257-
reek (6.3.0)
258-
dry-schema (~> 1.13.0)
260+
reek (6.5.0)
261+
dry-schema (~> 1.13)
262+
logger (~> 1.6)
259263
parser (~> 3.3.0)
260264
rainbow (>= 2.0, < 4.0)
261265
rexml (~> 3.1)
262-
regexp_parser (2.9.0)
266+
regexp_parser (2.10.0)
263267
reline (0.4.3)
264268
io-console (~> 0.5)
265269
rexml (3.2.6)
@@ -276,32 +280,41 @@ GEM
276280
diff-lcs (>= 1.2.0, < 2.0)
277281
rspec-support (~> 3.13.0)
278282
rspec-support (3.13.1)
279-
rubocop (1.62.1)
283+
rubocop (1.75.8)
280284
json (~> 2.3)
281-
language_server-protocol (>= 3.17.0)
285+
language_server-protocol (~> 3.17.0.2)
286+
lint_roller (~> 1.1.0)
282287
parallel (~> 1.10)
283288
parser (>= 3.3.0.2)
284289
rainbow (>= 2.2.2, < 4.0)
285-
regexp_parser (>= 1.8, < 3.0)
286-
rexml (>= 3.2.5, < 4.0)
287-
rubocop-ast (>= 1.31.1, < 2.0)
290+
regexp_parser (>= 2.9.3, < 3.0)
291+
rubocop-ast (>= 1.44.0, < 2.0)
288292
ruby-progressbar (~> 1.7)
289-
unicode-display_width (>= 2.4.0, < 3.0)
290-
rubocop-ast (1.31.2)
291-
parser (>= 3.3.0.4)
292-
rubocop-capybara (2.20.0)
293-
rubocop (~> 1.41)
294-
rubocop-factory_bot (2.25.1)
295-
rubocop (~> 1.41)
293+
unicode-display_width (>= 2.4.0, < 4.0)
294+
rubocop-ast (1.44.1)
295+
parser (>= 3.3.7.2)
296+
prism (~> 1.4)
297+
rubocop-magic_numbers (0.5.0)
298+
parser
299+
rubocop
296300
rubocop-performance (1.20.2)
297301
rubocop (>= 1.48.1, < 2.0)
298302
rubocop-ast (>= 1.30.0, < 2.0)
299-
rubocop-rake (0.6.0)
300-
rubocop (~> 1.0)
301-
rubocop-rspec (2.27.1)
302-
rubocop (~> 1.40)
303-
rubocop-capybara (~> 2.17)
304-
rubocop-factory_bot (~> 2.22)
303+
rubocop-rails (2.32.0)
304+
activesupport (>= 4.2.0)
305+
lint_roller (~> 1.1)
306+
rack (>= 1.1)
307+
rubocop (>= 1.75.0, < 2.0)
308+
rubocop-ast (>= 1.44.0, < 2.0)
309+
rubocop-rake (0.7.1)
310+
lint_roller (~> 1.1)
311+
rubocop (>= 1.72.1)
312+
rubocop-rspec (3.6.0)
313+
lint_roller (~> 1.1)
314+
rubocop (~> 1.72, >= 1.72.1)
315+
rubocop-thread_safety (0.7.2)
316+
lint_roller (~> 1.1)
317+
rubocop (~> 1.72, >= 1.72.1)
305318
ruby-progressbar (1.13.0)
306319
ruby_parser (3.21.0)
307320
racc (~> 1.5)
@@ -344,9 +357,12 @@ DEPENDENCIES
344357
reek
345358
rspec
346359
rubocop
360+
rubocop-magic_numbers
347361
rubocop-performance
348-
rubocop-rake
349-
rubocop-rspec
362+
rubocop-rails
363+
rubocop-rake (> 0.7.0)
364+
rubocop-rspec (> 3.5.0)
365+
rubocop-thread_safety
350366
sqlite3 (~> 1.0)
351367

352368
BUNDLED WITH

gemfiles/rails_7.gemfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,19 @@ gem "net-smtp", require: false
88
gem "sqlite3", "~> 1.0"
99
gem "rails", "~> 7.0"
1010

11+
group :development, :test do
12+
gem "fasterer"
13+
gem "pry-byebug"
14+
gem "rake"
15+
gem "reek"
16+
gem "rspec"
17+
gem "rubocop"
18+
gem "rubocop-magic_numbers"
19+
gem "rubocop-performance"
20+
gem "rubocop-rails"
21+
gem "rubocop-rake", "> 0.7.0"
22+
gem "rubocop-rspec", "> 3.5.0"
23+
gem "rubocop-thread_safety"
24+
end
25+
1126
gemspec path: "../"

0 commit comments

Comments
 (0)