File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,10 @@ jobs:
296296 pattern : sd-*
297297 merge-multiple : true
298298
299+ - name : Get commit count
300+ id : commit_count
301+ run : echo "count=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT
302+
299303 - name : Get commit hash
300304 id : commit
301305 uses : pr-mpt/actions-commit-hash@v2
@@ -306,7 +310,10 @@ jobs:
306310 env :
307311 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
308312 with :
309- tag_name : ${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}
313+ tag_name : >
314+ ${{ github.ref_name == 'master' &&
315+ format('release_{0}_{1}', steps.commit_count.outputs.count, steps.commit.outputs.short) ||
316+ format('{0}-{1}', env.BRANCH_NAME, steps.commit.outputs.short) }}
310317
311318 - name : Upload release
312319 id : upload_release
You can’t perform that action at this time.
0 commit comments