Skip to content

Commit

Permalink
ci: Add gem release workflow (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxveldink authored Mar 5, 2024
1 parent 042f655 commit f2d7624
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release-gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
push:
branches: main

jobs:
code_quality:
uses: ./.github/workflows/main.yml
release-gem:
runs-on: ubuntu-latest
needs: code_quality
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
ref: ${{github.head_ref}}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
- name: Setup
run: |
git config user.email "[email protected]"
git config user.name "Max VelDink"
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
env:
GEM_HOST_API_KEY: "${{secrets.RUBY_GEMS_PUSH_API_KEY}}"
- name: Install
run: gem install gemsmith
- name: Publish
run: gemsmith --publish

0 comments on commit f2d7624

Please sign in to comment.