Publish Gem #6
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: | |
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 |