Publish Gem #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Gem | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version" | |
required: true | |
type: string | |
jobs: | |
push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
# Set up | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
ruby-version: ruby | |
- name: Update version | |
run: | | |
sed -i 's/".*"/"${{ inputs.version }}"/' version.rb | |
bundle | |
bundle exec appraisal | |
git config user.name 'GitHub Actions' | |
git config user.email [email protected] | |
git add . | |
git commit -m "Version bump" | |
git push | |
# Release | |
- uses: rubygems/release-gem@v1 |