Skip to content

Commit

Permalink
Merge pull request #466 from puppetlabs/fix-release-workflow
Browse files Browse the repository at this point in the history
Use credentials file for Rubygems auth
  • Loading branch information
genebean authored Dec 8, 2021
2 parents 3c61050 + 950e8cd commit be72bb4
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 be72bb4

Please sign in to comment.