Skip to content

ci: Add gem release workflow (#27) #1

ci: Add gem release workflow (#27)

ci: Add gem release workflow (#27) #1

Workflow file for this run

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