Skip to content

Commit

Permalink
chore: Add the .gem file to release for easier publishing in an MFA w…
Browse files Browse the repository at this point in the history
…orld (#133)
  • Loading branch information
mdp authored Aug 30, 2023
1 parent 131d2c3 commit b7bae90
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,11 @@ jobs:
- name: Run tests
run: bundle exec rspec
if: ${{ steps.release.outputs.release_created }}
# Publish
- name: publish gem
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_AUTH_TOKEN}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
# build gem and add to release
- name: Upload Release Artifact
if: ${{ steps.release.outputs.release_created }}
env:
# Make sure to update the secret name
# if yours isn't named RUBYGEMS_AUTH_TOKEN
RUBYGEMS_AUTH_TOKEN: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
if: ${{ steps.release.outputs.release_created }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
gem build *.gemspec
gh release upload ${{ steps.release.outputs.tag_name }} *.gem

0 comments on commit b7bae90

Please sign in to comment.