Release #20
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: Release | |
on: workflow_dispatch | |
jobs: | |
main-job: | |
name: Release | |
runs-on: ubuntu-latest | |
env: | |
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: head | |
rubygems: latest | |
- name: Draft a new release | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token | |
version="v$(grep STRING lib/kintsugi/version.rb | cut -d \" -f 2)" | |
git tag $version | |
git push --tag | |
gh release create $version --generate-notes | |
- name: Publish to rubygems.org | |
run: | | |
gem build *.gemspec | |
gem push *.gem |