mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-25 21:28:40 -05:00
Merge pull request #152 from puppetlabs/reviews-and-releases
Docs on contributing and releasing
This commit is contained in:
commit
b84bc2b5d5
4 changed files with 62 additions and 29 deletions
29
.github/workflows/gempush.yml
vendored
29
.github/workflows/gempush.yml
vendored
|
|
@ -1,29 +0,0 @@
|
|||
name: Ruby Gem
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build + Publish
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Ruby 2.6
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
version: 2.6.x
|
||||
|
||||
- name: Publish to RubyGems
|
||||
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 build *.gemspec
|
||||
gem push *.gem
|
||||
env:
|
||||
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
||||
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}}
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -25,6 +25,8 @@ build/
|
|||
/vendor/
|
||||
/lib/bundler/man/
|
||||
|
||||
.dccache
|
||||
|
||||
# for a library or gem, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
Gemfile.lock
|
||||
|
|
|
|||
18
README.md
18
README.md
|
|
@ -19,6 +19,9 @@ A CLI helper tool for [Puppet's VMPooler](https://github.com/puppetlabs/vmpooler
|
|||
- [VMPooler API](#vmpooler-api)
|
||||
- [Using the Pooler class](#using-the-pooler-class)
|
||||
- [Example Projects](#example-projects)
|
||||
- [Contributing](#contributing)
|
||||
- [Code Reviews](#code-reviews)
|
||||
- [Releasing](#releasing)
|
||||
- [Special thanks](#special-thanks)
|
||||
|
||||
## Install
|
||||
|
|
@ -164,6 +167,21 @@ vmfloaty providers a `Pooler` class that gives users the ability to make request
|
|||
- [Brian Cain: vagrant-vmpooler](https://github.com/briancain/vagrant-vmpooler)
|
||||
- Use Vagrant to manage your vmpooler instances
|
||||
|
||||
## Contributing
|
||||
|
||||
PR's are welcome! We always love to see how others think this tool can be made better.
|
||||
|
||||
### Code Reviews
|
||||
|
||||
Please wait for multiple code owners to sign off on any notable change.
|
||||
|
||||
## Releasing
|
||||
|
||||
Releasing is a two step process:
|
||||
|
||||
1. Submit a release prep PR that updates `lib/vmfloaty/version.rb` to the desired new version and get that merged
|
||||
2. Navigate to <https://github.com/puppetlabs/vmfloaty/actions/workflows/release.yml> --> Run workflow --> select "main" branch --> Run workflow. This will publish a GitHub release, build, and push the gem to RubyGems.
|
||||
|
||||
## Special thanks
|
||||
|
||||
Special thanks to [Brian Cain](https://github.com/briancain) as he is the original author of vmfloaty! Vast amounts of this code exist thanks to his efforts.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue