mirror of
https://github.com/puppetlabs/vmpooler-provider-ec2.git
synced 2026-01-26 02:28:40 -05:00
The other cloud provider is GCE and not GCP. In the same way we are creating VMs in EC2 on AWS.
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
name: Release
|
|
|
|
on: workflow_dispatch
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'puppetlabs/vmpooler-provider-ec2'
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Get Version
|
|
id: gv
|
|
run: |
|
|
echo "::set-output name=ver::$(grep VERSION lib/vmpooler-provider-ec2/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: Install Ruby 2.5.8
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '2.5.8'
|
|
- 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 }}'
|