configure_trusted_publisher 0.1.10 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/configure_trusted_publisher/cli.rb +11 -4
- data/lib/configure_trusted_publisher/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a9eeb81ac727395d664122229b9108aba75775ad5ecd291239f411ef3ab62a1
|
4
|
+
data.tar.gz: 832e9fc59c964f009753c5a7f344ea7c5a06b8857d07e2a055f46e8c9cd91710
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 542eb5650153023308db798c0d0d93caace92d91a0dbd491461ea90bc15e8997f77968ed5219de3b62778de314c16dcdacf83baab503e66f351976abe2f931ae
|
7
|
+
data.tar.gz: c556b569df9c05bf5e9eadd4d9e9e0350bfdc5256206fc9e24cb640b693b6901fa7d68a2a39eb7329321898e77e35071624523877908adc44669e2b246539aab
|
@@ -294,10 +294,12 @@ module ConfigureTrustedPublisher
|
|
294
294
|
def write_release_action(repository, rubygem_name, environment: nil)
|
295
295
|
tag = "Automatically when a new tag matching v* is pushed"
|
296
296
|
manual = "Manually by running a GitHub Action"
|
297
|
+
release = "Automatically when a new GitHub release is published"
|
297
298
|
puts
|
298
299
|
response = ask_multiple_choice(
|
299
300
|
"How would you like releases for #{rubygem_name} to be triggered?", [
|
300
301
|
tag,
|
302
|
+
release,
|
301
303
|
manual
|
302
304
|
],
|
303
305
|
default: "2"
|
@@ -312,7 +314,12 @@ module ConfigureTrustedPublisher
|
|
312
314
|
"name: Push Gem",
|
313
315
|
nil,
|
314
316
|
"on:",
|
315
|
-
|
317
|
+
(case response
|
318
|
+
when tag then " push:\n tags:\n - 'v*'"
|
319
|
+
when release then " release:\n types:\n - published"
|
320
|
+
when manual then " workflow_dispatch:"
|
321
|
+
else raise "Unknown response: #{response.inspect}"
|
322
|
+
end),
|
316
323
|
nil,
|
317
324
|
"permissions:",
|
318
325
|
" contents: read",
|
@@ -331,13 +338,13 @@ module ConfigureTrustedPublisher
|
|
331
338
|
" steps:",
|
332
339
|
" # Set up",
|
333
340
|
" - name: Harden Runner",
|
334
|
-
" uses: step-security/harden-runner@
|
341
|
+
" uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2",
|
335
342
|
" with:",
|
336
343
|
" egress-policy: audit",
|
337
344
|
nil,
|
338
|
-
" - uses: actions/checkout@
|
345
|
+
" - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2",
|
339
346
|
" - name: Set up Ruby",
|
340
|
-
" uses: ruby/setup-ruby@
|
347
|
+
" uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0",
|
341
348
|
" with:",
|
342
349
|
" bundler-cache: true",
|
343
350
|
" ruby-version: ruby",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: configure_trusted_publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Giddins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '3.5'
|
75
75
|
requirements: []
|
76
|
-
rubygems_version: 3.5.
|
76
|
+
rubygems_version: 3.5.22
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: A small CLI to automate the process of configuring a trusted publisher for
|