Skip to content

Commit

Permalink
setup release please to publish the gem
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsturgess committed Dec 5, 2023
1 parent a00ef4b commit 2bb5fc9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,31 @@ jobs:
run: bundle install
- name: Run tests
run: bin/rspec

release:
runs-on: ubuntu-latest
needs: [release-please, test]
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 2bb5fc9

Please sign in to comment.