File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 99 create_release :
1010 runs-on : ubuntu-latest
1111 permissions :
12- contents : write
12+ contents : write # Grant permission to create releases/tags
1313 steps :
14+ # This new step manually calculates the short SHA
15+ - name : Get short SHA
16+ id : get_sha
17+ run : echo "sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
18+
19+ # This step now uses the output from the step above
1420 - name : Create Release
1521 uses : actions/create-release@v1
1622 env :
1723 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1824 with :
19- tag_name : commit-${{ github.short_sha }}
20- release_name : Release ${{ github.short_sha }}
25+ tag_name : commit-${{ steps.get_sha.outputs.sha }}
26+ release_name : Release ${{ steps.get_sha.outputs.sha }}
2127 body : |
2228 Automatic release created from commit ${{ github.sha }} on the main branch.
2329 draft : false
You can’t perform that action at this time.
0 commit comments