Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zyc9012 committed Dec 27, 2024
1 parent 088fc87 commit 84722b5
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/gem-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
path: pkg/*.gem

publish:
# if: startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/v')
needs: ['build-ruby', 'build-native']
strategy:
matrix:
Expand All @@ -74,15 +74,13 @@ jobs:
with:
name: "${{ matrix.platform }}-gem"
path: pkg
- name: List files
run: ls -l pkg
# - name: Publish to RubyGems
# shell: bash
# run: |
# mkdir -p $HOME/.gem
# touch $HOME/.gem/credentials
# chmod 0600 $HOME/.gem/credentials
# printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
# gem push pkg/*.gem
# env:
# GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"
- name: Publish to RubyGems
shell: bash
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem push pkg/*.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"

0 comments on commit 84722b5

Please sign in to comment.