Skip to content

Commit fb34899

Browse files
committed
Try other tag based flow
1 parent 0e71025 commit fb34899

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/delivery.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Delivery
33
on:
44
push:
55
branches: [main]
6+
tags: ['v[0-9]+.[0-9]+.[0-9]+']
67
pull_request:
78
branches: [main]
89
workflow_dispatch:
@@ -26,8 +27,7 @@ jobs:
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"
@@ -85,8 +85,7 @@ jobs:
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

0 commit comments

Comments
 (0)