Add CI to tag main branch when VERSION changes
This commit is contained in:
parent
68aebe4175
commit
9647e09863
|
|
@ -0,0 +1,20 @@
|
|||
# This workflow adds git tag to the main branch when version changes.
|
||||
|
||||
name: Release Tag
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- VERSION
|
||||
|
||||
jobs:
|
||||
tag_main_branch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add git tag
|
||||
uses: pxpm/github-tag-action@1.0.1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: v0.5.0
|
||||
|
|
@ -85,6 +85,11 @@ validate_bump_type() {
|
|||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Update tag version (`v{version}`) in file $1
|
||||
update_tag_version() {
|
||||
echo "Updating file $1"
|
||||
sed -i "s/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/v${new_version}/g" $1
|
||||
}
|
||||
|
||||
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
|
@ -124,6 +129,10 @@ for workflow in $WORKFLOWS; do
|
|||
update_image_versions $workflow
|
||||
done
|
||||
|
||||
# Update tag version in release_tag workflow
|
||||
RELEASE_TAG_WORKFLOW=${ASTER_SRC_DIR}/.github/workflows/release_tag.yml
|
||||
update_tag_version $RELEASE_TAG_WORKFLOW
|
||||
|
||||
# Update Docker image versions in the documentation
|
||||
GET_STARTED_PATH=${ASTER_SRC_DIR}/docs/src/kernel/README.md
|
||||
update_image_versions $GET_STARTED_PATH
|
||||
|
|
|
|||
Loading…
Reference in New Issue