-
Notifications
You must be signed in to change notification settings - Fork 0
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 rook#8461 from subhamkrai/automate-release-action
ci: create tag and print release notes
- Loading branch information
Showing
2 changed files
with
45 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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