mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 05:28:40 -05:00
Update release workflow to on dispatch and add notes about releasing
This commit is contained in:
parent
903e59afb8
commit
3e8ddca1e3
3 changed files with 60 additions and 29 deletions
42
.github/workflows/release.yml
vendored
Normal file
42
.github/workflows/release.yml
vendored
Normal 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}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue