Skip to content

Commit 67d9869

Browse files
committed
attempt to fix release tag with branch
1 parent 876d85b commit 67d9869

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build and Release
33
on:
44
push:
55
tags:
6-
- 'v*.*.*' # This triggers the workflow on tags following semantic versioning
6+
- 'v*.*.*' # Trigger on semantic versioning tags
77

88
jobs:
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:

0 commit comments

Comments
 (0)