configure_trusted_publisher 0.1.7 → 0.1.9
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 +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '069cf11b54abc980ac845968c09a93b3779aa4153ca6ae8c4e58093352fd5270'
|
4
|
+
data.tar.gz: 4da5f62636b14c6837fadb4847f27e3267b13797ba4e4c66a4e9bbbfe35adc48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 146c6c690a138f3c837aa7aee7fa39e25b9cbc08a30884a2441fcf796ca46e691814ca1c039d10e2ecc8fe4309b91aebd67152a95fc062e050cb41957f4fe9b9
|
7
|
+
data.tar.gz: 9aeff4f526331e46da39edba8bacc5eebfea0f6d2ab6b703195032dec8c0c4842ca34136a4cca35e995741864a12ad484a0e99781a941eb1c8ddb4d1f151c1f0
|
@@ -154,17 +154,18 @@ module ConfigureTrustedPublisher
|
|
154
154
|
puts "Configuring trusted publisher for #{rubygem_name} in #{File.expand_path(repository)} for " \
|
155
155
|
"#{github_repository.join('/')}"
|
156
156
|
|
157
|
-
|
157
|
+
environment = add_environment
|
158
|
+
write_release_action(repository, rubygem_name, environment:)
|
158
159
|
|
159
160
|
gc = GemcutterUtilities.new(
|
160
161
|
say: ->(msg) { puts msg },
|
161
162
|
ask: lambda { |msg|
|
162
163
|
puts
|
163
|
-
ask msg.chomp(":")
|
164
|
+
ask msg.strip.chomp(":")
|
164
165
|
},
|
165
166
|
ask_for_password: lambda { |msg|
|
166
167
|
puts
|
167
|
-
ask_secret msg.chomp(":")
|
168
|
+
ask_secret msg.strip.chomp(":")
|
168
169
|
},
|
169
170
|
terminate_interaction: lambda { |msg|
|
170
171
|
puts
|
@@ -179,8 +180,9 @@ module ConfigureTrustedPublisher
|
|
179
180
|
"trusted_publisher" => {
|
180
181
|
"repository_name" => name,
|
181
182
|
"repository_owner" => owner,
|
183
|
+
"environment" => environment,
|
182
184
|
"workflow_filename" => "push_gem.yml"
|
183
|
-
},
|
185
|
+
}.compact,
|
184
186
|
"trusted_publisher_type" => "OIDC::TrustedPublisher::GitHubAction"
|
185
187
|
}
|
186
188
|
|
@@ -250,6 +252,11 @@ module ConfigureTrustedPublisher
|
|
250
252
|
return unless ask_yes_or_no("Would you like to add a github environment to allow customizing " \
|
251
253
|
"prerequisites for the action?")
|
252
254
|
|
255
|
+
if Bundler.which("gh").nil?
|
256
|
+
exit "The GitHub CLI (gh) is required to add a GitHub environment. " \
|
257
|
+
"Please install it from https://cli.github.com/ and try again."
|
258
|
+
end
|
259
|
+
|
253
260
|
env_name = "rubygems.org"
|
254
261
|
|
255
262
|
owner, name = github_repository
|
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.1.9
|
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-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|