Skip to content

Commit

Permalink
Use credentials file for Rubygems auth
Browse files Browse the repository at this point in the history
  • Loading branch information
genebean committed Dec 8, 2021
1 parent 3c61050 commit 950e8cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
- name: Build gem
run: gem build *.gemspec
- name: Publish gem
run: gem push *.gem
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 *.gem
env:
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'

0 comments on commit 950e8cd

Please sign in to comment.