Skip to content

Commit 3c19df7

Browse files
committed
release: v0.0.1
1 parent 52af810 commit 3c19df7

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Release Observability Artifacts
22

33
on:
4+
push:
5+
branches:
6+
- ci-release
47
workflow_dispatch:
58
inputs:
69
version:
@@ -17,15 +20,21 @@ jobs:
1720
steps:
1821
- name: Checkout code
1922
uses: actions/checkout@v4
20-
21-
- name: Set release version
22-
id: version
23+
- name: Extract version from commit message
24+
id: extract
2325
run: |
24-
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
25-
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
26-
else
27-
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
28-
fi
26+
COMMIT_MSG="${{ github.event.head_commit.message }}"
27+
VERSION=$(echo "$COMMIT_MSG" | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+')
28+
echo "VERSION=$VERSION" >> $GITHUB_ENV
29+
30+
# - name: Set release version
31+
# id: version
32+
# run: |
33+
# if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
34+
# echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
35+
# else
36+
# echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
37+
# fi
2938

3039
- name: Package Grafana artifacts
3140
run: |

0 commit comments

Comments
 (0)