Skip to content

Commit 875ed8c

Browse files
authored
Validate RUBYGEMS_AUTH_TOKEN in release workflow
Add a check for RUBYGEMS_AUTH_TOKEN before publishing.
1 parent 3b917f3 commit 875ed8c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ jobs:
5353
ruby-version: '3.2'
5454
bundler-cache: true
5555

56+
- name: Check if RUBYGEMS_AUTH_TOKEN is set
57+
run: |
58+
if [ -z "${{ secrets.RUBYGEMS_AUTH_TOKEN }}" ]; then
59+
echo 'RUBYGEMS_AUTH_TOKEN not set!'
60+
exit 1
61+
else
62+
echo 'RUBYGEMS_AUTH_TOKEN is available.'
63+
fi
64+
5665
- name: Publish gem to RubyGems
5766
uses: rubygems/release-gem@v2
5867
with:

0 commit comments

Comments
 (0)