Skip to content

Publish Gem

Publish Gem #6

Workflow file for this run

name: Publish Gem
on:
workflow_dispatch:
jobs:
publish_and_release:
name: Publish gem to RubyGems.org and create a GitHub Release
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby
- uses: rubygems/release-gem@v1
- name: Get version
id: version
run: |
VERSION=$(ruby -e "require './lib/tip_tap/version'; puts TipTap::VERSION")
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.version.outputs.version }}
release_name: Release ${{ steps.version.outputs.version }}
body: |
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/master/CHANGELOG.md) for details.
draft: false
prerelease: false