File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ name: Delivery
33on :
44 push :
55 branches : [main]
6+ tags : ['v[0-9]+.[0-9]+.[0-9]+']
67 pull_request :
78 branches : [main]
89 workflow_dispatch :
2627 - name : Select build profile
2728 id : config
2829 run : |
29- TAG=$(git tag --points-at HEAD | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' | head -1)
30- if [[ -n "${TAG}" ]]; then
30+ if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
3131 echo "profile=release" >> "$GITHUB_OUTPUT"
3232 else
3333 echo "profile=edge" >> "$GITHUB_OUTPUT"
8585 - name : Select build profile
8686 id : config
8787 run : |
88- TAG=$(git tag --points-at HEAD | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' | head -1)
89- if [[ -n "${TAG}" ]]; then
88+ if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
9089 echo "profile=release" >> "$GITHUB_OUTPUT"
9190 else
9291 echo "profile=edge" >> "$GITHUB_OUTPUT"
@@ -127,7 +126,11 @@ jobs:
127126 - name : Detect release tag on HEAD
128127 id : release
129128 run : |
130- TAG=$(git tag --points-at HEAD | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' | head -1)
129+ if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
130+ TAG="${{ github.ref_name }}"
131+ else
132+ TAG=""
133+ fi
131134 echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
132135 echo "is_release=$([[ -n "${TAG}" ]] && echo true || echo false)" >> "$GITHUB_OUTPUT"
133136
You can’t perform that action at this time.
0 commit comments