Skip to content

Commit

Permalink
Fix publish gem GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
abevoelker committed Sep 8, 2023
1 parent 8f01140 commit 25a018a
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/publish_gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,24 @@ on:
tags:
- '*'

---

- name: Publish gem
uses: dawidd6/action-publish-gem@v1
with:
# Optional, will publish to RubyGems if specified
api_key: ${{secrets.RUBYGEMS_API_KEY}}
# Optional, will publish to GitHub Packages if specified
github_token: ${{secrets.GITHUB_TOKEN}}
jobs:
publish:
if: ${{ !github.event.act }} # skip during local actions testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake
- name: Publish gem
uses: dawidd6/action-publish-gem@v1
with:
# Optional, will publish to RubyGems if specified
api_key: ${{secrets.RUBYGEMS_API_KEY}}
# Optional, will publish to GitHub Packages if specified
github_token: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 25a018a

Please sign in to comment.