File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Build and Release
33on :
44 push :
55 tags :
6- - ' v*.*.*' # This triggers the workflow on tags following semantic versioning
6+ - ' v*.*.*' # Trigger on semantic versioning tags
77
88jobs :
99 build :
@@ -36,22 +36,15 @@ jobs:
3636 - name : Create Release
3737 id : create_release
3838 run : |
39- if [[ "${GITHUB_REF}" == "refs/tags/v"* ]]; then
40- TAG_NAME=${GITHUB_REF#refs/tags/}
41- if [[ "${GITHUB_REF}" == "refs/tags/v"* ]]; then
42- echo "Creating release for tag $TAG_NAME"
43- echo "GITHUB_REF=$GITHUB_REF" >> $GITHUB_ENV
44- fi
45- else
46- echo "Not a valid tag, skipping release creation."
47- exit 0
48- fi
39+ TAG_NAME=${GITHUB_REF#refs/tags/}
40+ echo "Creating release for tag $TAG_NAME"
41+ echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
4942
5043 - name : Upload Package to Release
51- if : steps.create_release.outputs.tag_name != ' '
44+ if : startsWith(github.ref, 'refs/tags/v') # Run this step if the tag starts with 'v '
5245 uses : softprops/action-gh-release@v1
5346 with :
54- tag_name : ${{ steps.create_release.outputs.tag_name }}
47+ tag_name : ${{ env.TAG_NAME }}
5548 files : |
5649 dist/*
5750 env :
You can’t perform that action at this time.
0 commit comments