Skip to content

Commit 76ec0ae

Browse files
committed
Update gem publishing step to use environment variables and improve error handling
1 parent 8779cbf commit 76ec0ae

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,13 @@ jobs:
113113
114114
- name: Publish gem to RubyGems
115115
if: steps.rubygems.outputs.exists != 'true'
116-
uses: rubygems/release-gem@v1
117-
with:
118-
token: ${{ secrets.RUBYGEMS_API_KEY }}
119-
setup-trusted-publisher: false
116+
env:
117+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
118+
RELEASE_VERSION: ${{ steps.release.outputs.version }}
119+
run: |
120+
if [ -z "$GEM_HOST_API_KEY" ]; then
121+
echo 'Missing RUBYGEMS_API_KEY secret.'
122+
exit 1
123+
fi
124+
125+
gem push "cloudstack-cli-$RELEASE_VERSION.gem"

0 commit comments

Comments
 (0)