Skip to content

Commit b84bc2b

Browse files
authored
Merge pull request #152 from puppetlabs/reviews-and-releases
Docs on contributing and releasing
2 parents 22b525b + 3e8ddca commit b84bc2b

File tree

4 files changed

+62
-29
lines changed

4 files changed

+62
-29
lines changed

.github/workflows/gempush.yml

-29
This file was deleted.

.github/workflows/release.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
release:
7+
name: Build + Publish
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Get Version
13+
id: gv
14+
run: |
15+
echo "::set-output name=ver::$(grep VERSION lib/vmfloaty/version.rb |rev |cut -d "'" -f2 |rev)"
16+
17+
- name: Tag Release
18+
uses: ncipollo/release-action@v1
19+
with:
20+
tag: ${{ steps.gv.outputs.ver }}
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
draft: false
23+
prerelease: false
24+
generateReleaseNotes: true
25+
26+
- name: Set up Ruby 2.7
27+
uses: actions/setup-ruby@v1
28+
with:
29+
version: 2.7.x
30+
31+
- name: Build gem
32+
run: gem build *.gemspec
33+
34+
- name: Publish gem
35+
run: |
36+
mkdir -p $HOME/.gem
37+
touch $HOME/.gem/credentials
38+
chmod 0600 $HOME/.gem/credentials
39+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
40+
gem push *.gem
41+
env:
42+
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ build/
2525
/vendor/
2626
/lib/bundler/man/
2727

28+
.dccache
29+
2830
# for a library or gem, you might want to ignore these files since the code is
2931
# intended to run in multiple environments; otherwise, check them in:
3032
Gemfile.lock

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ A CLI helper tool for [Puppet's VMPooler](https://github.com/puppetlabs/vmpooler
1919
- [VMPooler API](#vmpooler-api)
2020
- [Using the Pooler class](#using-the-pooler-class)
2121
- [Example Projects](#example-projects)
22+
- [Contributing](#contributing)
23+
- [Code Reviews](#code-reviews)
24+
- [Releasing](#releasing)
2225
- [Special thanks](#special-thanks)
2326

2427
## Install
@@ -164,6 +167,21 @@ vmfloaty providers a `Pooler` class that gives users the ability to make request
164167
- [Brian Cain: vagrant-vmpooler](https://github.com/briancain/vagrant-vmpooler)
165168
- Use Vagrant to manage your vmpooler instances
166169

170+
## Contributing
171+
172+
PR's are welcome! We always love to see how others think this tool can be made better.
173+
174+
### Code Reviews
175+
176+
Please wait for multiple code owners to sign off on any notable change.
177+
178+
## Releasing
179+
180+
Releasing is a two step process:
181+
182+
1. Submit a release prep PR that updates `lib/vmfloaty/version.rb` to the desired new version and get that merged
183+
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.
184+
167185
## Special thanks
168186

169187
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.

0 commit comments

Comments
 (0)