mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Refactor release-prep and action due to issue running via docker
This commit is contained in:
parent
d6e6d670e6
commit
c3f98281c9
3 changed files with 64 additions and 42 deletions
94
.github/workflows/release.yml
vendored
94
.github/workflows/release.yml
vendored
|
|
@ -1,14 +1,22 @@
|
||||||
name: Release Gem
|
name: Release Gem
|
||||||
|
|
||||||
on: workflow_dispatch
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
validate-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository == 'puppetlabs/vmpooler'
|
if: github.repository == 'puppetlabs/vmpooler'
|
||||||
|
outputs:
|
||||||
|
cv: ${{ steps.cv.outputs.version }}
|
||||||
|
nv: ${{ steps.nv.outputs.version }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install Ruby 3.1
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 'ruby-3.1'
|
||||||
|
|
||||||
- name: Get Current Version
|
- name: Get Current Version
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
id: cv
|
id: cv
|
||||||
|
|
@ -30,10 +38,9 @@ jobs:
|
||||||
echo "Found version $version from lib/vmpooler/version.rb"
|
echo "Found version $version from lib/vmpooler/version.rb"
|
||||||
|
|
||||||
- name: Generate Changelog
|
- name: Generate Changelog
|
||||||
uses: docker://githubchangeloggenerator/github-changelog-generator:1.16.2
|
run : |
|
||||||
with:
|
gem install github_changelog_generator -v '~> 1.15.2'
|
||||||
args: >-
|
CONSOLE_LEVEL=debug github_changelog_generator --future-release ${{ steps.nv.outputs.version }}
|
||||||
--future-release ${{ steps.nv.outputs.version }}
|
|
||||||
env:
|
env:
|
||||||
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
@ -51,39 +58,60 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Generate Release Notes
|
- name: Generate Release Notes
|
||||||
uses: docker://githubchangeloggenerator/github-changelog-generator:1.16.2
|
run : |
|
||||||
with:
|
github_changelog_generator \
|
||||||
args: >-
|
--since-tag ${{ steps.cv.outputs.result }} \
|
||||||
--since-tag ${{ steps.cv.outputs.result }}
|
--future-release ${{ steps.nv.outputs.version }} \
|
||||||
--future-release ${{ steps.nv.outputs.version }}
|
|
||||||
--output release-notes.md
|
--output release-notes.md
|
||||||
env:
|
env:
|
||||||
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Tag Release
|
- uses: actions/upload-artifact@v3
|
||||||
uses: ncipollo/release-action@v1
|
|
||||||
with:
|
with:
|
||||||
tag: ${{ steps.nv.outputs.version }}
|
name: release-notes
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
path: release-notes.md
|
||||||
bodyfile: release-notes.md
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
|
|
||||||
# This step should closely match what is used in `docker/Dockerfile` in vmpooler-deployment
|
publish-release:
|
||||||
- name: Install Ruby jruby-9.4.3.0
|
runs-on: ubuntu-latest
|
||||||
uses: ruby/setup-ruby@v1
|
needs: validate-release
|
||||||
|
if: github.repository == 'puppetlabs/vmpooler'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
ruby-version: 'jruby-9.4.3.0'
|
name: release-notes
|
||||||
|
path: release-notes.md
|
||||||
|
|
||||||
- name: Build gem
|
- name: Test Outputs
|
||||||
run: gem build *.gemspec
|
|
||||||
|
|
||||||
- name: Publish gem
|
|
||||||
run : |
|
run : |
|
||||||
mkdir -p $HOME/.gem
|
cat release-notes.md
|
||||||
touch $HOME/.gem/credentials
|
echo ${{ needs.validate-release.outputs.nv.version }}
|
||||||
chmod 0600 $HOME/.gem/credentials
|
|
||||||
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
# - name: Tag Release
|
||||||
gem push *.gem
|
# uses: ncipollo/release-action@v1
|
||||||
env:
|
# with:
|
||||||
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
|
# tag: ${{ needs.validate-release.outputs.nv.version }}
|
||||||
|
# token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# bodyfile: release-notes.md
|
||||||
|
# draft: false
|
||||||
|
# prerelease: false
|
||||||
|
|
||||||
|
# # This step should closely match what is used in `docker/Dockerfile` in vmpooler-deployment
|
||||||
|
# - name: Install Ruby jruby-9.4.3.0
|
||||||
|
# uses: ruby/setup-ruby@v1
|
||||||
|
# with:
|
||||||
|
# ruby-version: 'jruby-9.4.3.0'
|
||||||
|
|
||||||
|
# - 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 }}'
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [3.3.0](https://github.com/puppetlabs/vmpooler/tree/3.3.0) (2023-08-15)
|
## [3.3.0](https://github.com/puppetlabs/vmpooler/tree/3.3.0) (2023-08-16)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/puppetlabs/vmpooler/compare/3.2.0...3.3.0)
|
[Full Changelog](https://github.com/puppetlabs/vmpooler/compare/3.2.0...3.3.0)
|
||||||
|
|
||||||
**Implemented enhancements:**
|
|
||||||
|
|
||||||
- \(RE-15162\) Update Redis gem to version 5.0. [\#561](https://github.com/puppetlabs/vmpooler/pull/561) ([isaac-hammes](https://github.com/isaac-hammes))
|
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
- Redis 5.x Deprecations [\#603](https://github.com/puppetlabs/vmpooler/issues/603)
|
- Redis 5.x Deprecations [\#603](https://github.com/puppetlabs/vmpooler/issues/603)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,5 @@ docker run -it --rm \
|
||||||
/bin/bash -c 'apt-get update -qq && apt-get install -y --no-install-recommends git make netbase && cd /app && gem install bundler && bundle install --jobs 3; echo "LOCK_FILE_UPDATE_EXIT_CODE=$?"'
|
/bin/bash -c 'apt-get update -qq && apt-get install -y --no-install-recommends git make netbase && cd /app && gem install bundler && bundle install --jobs 3; echo "LOCK_FILE_UPDATE_EXIT_CODE=$?"'
|
||||||
|
|
||||||
# Update Changelog
|
# Update Changelog
|
||||||
docker run -it --rm -e CHANGELOG_GITHUB_TOKEN -v $(pwd):/usr/local/src/your-app \
|
gem install github_changelog_generator -v '~> 1.15.2'
|
||||||
githubchangeloggenerator/github-changelog-generator:1.16.2 \
|
|
||||||
github_changelog_generator --future-release $(grep VERSION lib/vmpooler/version.rb |rev |cut -d "'" -f2 |rev)
|
github_changelog_generator --future-release $(grep VERSION lib/vmpooler/version.rb |rev |cut -d "'" -f2 |rev)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue