Update release workflow to on dispatch and add notes about releasing

This commit is contained in:
Jake Spain 2022-04-05 11:36:35 -04:00
parent 903e59afb8
commit 3e8ddca1e3
No known key found for this signature in database
GPG key ID: BC1C4DA0A085E113
3 changed files with 60 additions and 29 deletions

42
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,42 @@
name: Release
on: workflow_dispatch
jobs:
release:
name: Build + Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Version
id: gv
run: |
echo "::set-output name=ver::$(grep VERSION lib/vmfloaty/version.rb |rev |cut -d "'" -f2 |rev)"
- name: Tag Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.gv.outputs.ver }}
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: false
generateReleaseNotes: true
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
with:
version: 2.7.x
- name: Build gem
run: gem build *.gemspec
- name: Publish gem
run: |
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
gem push *.gem
env:
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}