-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from Cray-HPE/release/1.4.10
Release/1.4.10
- Loading branch information
Showing
4 changed files
with
76 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters