ci: create tag and print release notes
since we moved to github action for the release, we maunally have to push the tag to build image. with this change, first, this action will set some environment variable which will be consume by the script to print release notes. then, it will ask for 1 input from github UI(in Action tab) tag: where we'll give the tag for the release after creating tag it will run the script and print release notes. **NOTE** please verify the environment var and release notes after the successful action run. . Signed-off-by: subhamkrai <srai@redhat.com>
This commit is contained in:
1 parent
a24ccfc26b
commit
8572fdb58b
2 files changed
+45
-21
No files matched your search
@@ -0,0 +1,42 @@
|
||||
name: Tag
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Release version (e.g. v1.7.0)'
|
||||
required: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
|
||||
shell: bash --noprofile --norc -eo pipefail -x {0}
|
||||
|
||||
jobs:
|
||||
Create-Tag:
|
||||
runs-on: ubuntu-18.04
|
||||
if: {{ github.repository == 'rook/rook' }}
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: set env
|
||||
run: |
|
||||
echo "FROM_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
||||
echo "TO_TAG=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
|
||||
echo "GITHUB_USER=rook" >> $GITHUB_ENV
|
||||
|
||||
- name: Create Tag
|
||||
uses: negz/create-tag@v1
|
||||
with:
|
||||
version: ${{ github.event.inputs.version }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get Release Note
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_USER: ${{ env.GITHUB_USER }}
|
||||
FROM_BRANCH: ${{ env.FROM_BRANCH }}
|
||||
TO_TAG: ${{ env.TO_TAG }}
|
||||
run: tests/scripts/gen_release_notes.sh
|
||||
Reference in new issue
Block a user