Skip to content

Commit

Permalink
setup pushing to rubygems
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsturgess committed Jan 23, 2024
1 parent 27b7166 commit 4975f7a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,32 @@ jobs:
run: bundle install
- name: Run tests
run: bin/rspec

release:
name: Publish to RubyGems
runs-on: ubuntu-latest
needs: [release-please, test, lint]
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@master

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2

- name: Build Gem
run: gem build *.gemspec

- name: Setup credentials
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
env:
RUBYGEMS_API_KEY: ${{secrets.KRYSTAL_RUBYGEMS_API_KEY}}

- name: Publish to RubyGems
run: |
gem push *.gem

0 comments on commit 4975f7a

Please sign in to comment.