Skip to content

Commit

Permalink
Merge pull request #62 from Cray-HPE/release/1.4.10
Browse files Browse the repository at this point in the history
Release/1.4.10
  • Loading branch information
rkleinman-hpe authored Jan 13, 2022
2 parents 4e86f93 + 1cc4929 commit ffa5efb
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 34 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ on:
workflow_dispatch:
push:
# Do not build pushes to the main/master branch, tags build prod releases
# Do not build release branches from historical CSM/Shasta releases
branches-ignore:
- main
- master
- 'releases/csm-**'
- 'releases/shasta-**'
# Do not build release branches from historical CSM/Shasta release branches
branches:
- feature/**
- hotfix/**
- support/**
- develop
- 'release/**'
- '!release/csm-**'
- '!release/shasta-**'

# Build production releases from tags on main/master, see GitFlow
tags:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Create GitHub Release

on:
push:
tags:
- 'v*'

jobs:

create-gh-release:
runs-on: ubuntu-latest
# permissions:
# contents: write
steps:
- uses: actions/checkout@v2
- name: Get semver tool; determine prerelease or not
id: prerelease
run: |
wget -O ./semver https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver
chmod +x ./semver
export RELEASE_VERSION=${GITHUB_REF#refs/*/v}
PRERELEASE=$(./semver get prerel ${RELEASE_VERSION})
if [[ "${PRERELEASE}" = "" ]]; then
echo ::set-output name=gh_prerelease::$(echo false)
else
echo ::set-output name=gh_prerelease::$(echo true)
fi
- uses: ncipollo/release-action@v1
if: ${{ steps.prerelease.outputs.gh_prerelease == "false" }}
with:
generateReleaseNotes: true
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}

- uses: ncipollo/release-action@v1
if: ${{ steps.prerelease.outputs.gh_prerelease == "true" }}
with:
generateReleaseNotes: true
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
44 changes: 19 additions & 25 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,45 @@ name: "Prepare for Release"
on:
pull_request:
branches:
- release/**
- hotfix/**
- '!release/csm-1.0'
- '!release/csm-1.2'
- '!release/shasta-1.4'
- master
types: [ opened ]

jobs:
prepare-for-release:
name: "Update changelog and version files"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: find version from branch name
id: get-version
run: |
if ${IS_RELEASE}; then
VERSION=${REF##refs/heads/release/}
else
VERSION=${REF##refs/heads/hotfix/}
if [[ "${{ contains(github.head_ref, 'release') }}" = "true" ]]; then
VERSION=${GITHUB_HEAD_REF##release/}
fi
if [[ "${{ contains(github.head_ref, 'hotfix') }}" = "true" ]]; then
VERSION=${GITHUB_HEAD_REF##hotfix/}
fi
echo ::set-output name=version::$(echo ${VERSION})
env:
REF: ${{ github.events.pull_request.head.ref}}
IS_RELEASE: ${{ contains(github.events.pull_request.head.ref, 'release')}}
IS_HOTFIX: ${{ contains(github.events.pull_request.head.ref, 'hotfix')}}
- run: |
echo ${{ env.VERSION }}
env:
VERSION: ${{ steps.get-version.outputs.version }}
# - name: Update changelog
# uses: thomaseizinger/[email protected]
# with:
# tag: ${{ steps.get-version.outputs.version }}
- name: Update changelog
uses: thomaseizinger/[email protected]
with:
tag: ${{ steps.get-version.outputs.version }}

# # If anything else needs to be done (bump version files etc) to generate
# # a release in this repository, do it here

# - name: Push Changes
# uses: stefanzweifel/git-auto-commit-action@v4
# id: auto-commit-action
# with:
# commit_message: "[bot] Prepare release ${{ steps.get-version.outputs.version }}"
# commit_user_name: "github-actions[bot]"
# branch: ${{ github.events.pull_request.head.ref }}

- name: Push Changes
uses: stefanzweifel/git-auto-commit-action@v4
id: auto-commit-action
with:
commit_message: "[bot] Prepare release ${{ steps.get-version.outputs.version }}"
commit_user_name: "github-actions[bot]"
branch: ${{ github.head_ref }}
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.4.10] - 2022-01-13

### Changed

- Only build artifacts on push events, not PRs. Change PR comments to point to
the individual commit, not the overall PR.
- Only build artifacts on push events, not PRs. Change PR comments to point to
the individual commit, not the overall PR.

## [1.4.6] - 2022-01-07

Expand Down Expand Up @@ -79,7 +81,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated repo to Gitflow branching strategy; develop branch now base branch
- Change default reviewers to CMS-core-product-support

[Unreleased]: https://github.com/Cray-HPE/cray-product-catalog/compare/1.4.6...HEAD
[Unreleased]: https://github.com/Cray-HPE/cray-product-catalog/compare/1.4.10...HEAD

[1.4.10]: https://github.com/Cray-HPE/cray-product-catalog/compare/1.4.6...1.4.10

[1.4.6]: https://github.com/Cray-HPE/cray-product-catalog/compare/1.4.5...1.4.6

Expand Down

0 comments on commit ffa5efb

Please sign in to comment.