File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change 11name : Release Observability Artifacts 
22
33on :
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 : | 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments