mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-25 17:48: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
|
||||
|
||||
on: workflow_dispatch
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
release:
|
||||
validate-release:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'puppetlabs/vmpooler'
|
||||
outputs:
|
||||
cv: ${{ steps.cv.outputs.version }}
|
||||
nv: ${{ steps.nv.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Ruby 3.1
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 'ruby-3.1'
|
||||
|
||||
- name: Get Current Version
|
||||
uses: actions/github-script@v6
|
||||
id: cv
|
||||
|
|
@ -30,10 +38,9 @@ jobs:
|
|||
echo "Found version $version from lib/vmpooler/version.rb"
|
||||
|
||||
- name: Generate Changelog
|
||||
uses: docker://githubchangeloggenerator/github-changelog-generator:1.16.2
|
||||
with:
|
||||
args: >-
|
||||
--future-release ${{ steps.nv.outputs.version }}
|
||||
run : |
|
||||
gem install github_changelog_generator -v '~> 1.15.2'
|
||||
CONSOLE_LEVEL=debug github_changelog_generator --future-release ${{ steps.nv.outputs.version }}
|
||||
env:
|
||||
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
|
@ -51,39 +58,60 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Generate Release Notes
|
||||
uses: docker://githubchangeloggenerator/github-changelog-generator:1.16.2
|
||||
with:
|
||||
args: >-
|
||||
--since-tag ${{ steps.cv.outputs.result }}
|
||||
--future-release ${{ steps.nv.outputs.version }}
|
||||
run : |
|
||||
github_changelog_generator \
|
||||
--since-tag ${{ steps.cv.outputs.result }} \
|
||||
--future-release ${{ steps.nv.outputs.version }} \
|
||||
--output release-notes.md
|
||||
env:
|
||||
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Tag Release
|
||||
uses: ncipollo/release-action@v1
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
tag: ${{ steps.nv.outputs.version }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
bodyfile: release-notes.md
|
||||
draft: false
|
||||
prerelease: false
|
||||
name: release-notes
|
||||
path: release-notes.md
|
||||
|
||||
# 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
|
||||
publish-release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: validate-release
|
||||
if: github.repository == 'puppetlabs/vmpooler'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
ruby-version: 'jruby-9.4.3.0'
|
||||
name: release-notes
|
||||
path: release-notes.md
|
||||
|
||||
- name: Test Outputs
|
||||
run : |
|
||||
cat release-notes.md
|
||||
echo ${{ needs.validate-release.outputs.nv.version }}
|
||||
|
||||
- name: Build gem
|
||||
run: gem build *.gemspec
|
||||
# - name: Tag Release
|
||||
# uses: ncipollo/release-action@v1
|
||||
# with:
|
||||
# tag: ${{ needs.validate-release.outputs.nv.version }}
|
||||
# token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# bodyfile: release-notes.md
|
||||
# draft: false
|
||||
# prerelease: false
|
||||
|
||||
- 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 }}'
|
||||
# # 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
|
||||
|
||||
## [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)
|
||||
|
||||
**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:**
|
||||
|
||||
- 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=$?"'
|
||||
|
||||
# Update Changelog
|
||||
docker run -it --rm -e CHANGELOG_GITHUB_TOKEN -v $(pwd):/usr/local/src/your-app \
|
||||
githubchangeloggenerator/github-changelog-generator:1.16.2 \
|
||||
github_changelog_generator --future-release $(grep VERSION lib/vmpooler/version.rb |rev |cut -d "'" -f2 |rev)
|
||||
|
||||
gem install github_changelog_generator -v '~> 1.15.2'
|
||||
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