File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 668668 " name " : " Calculate shasum" ,
669669 " run " : " shasum -a 256 assets/* > sha256"
670670 },
671+ {
672+ " id " : " create_tag" ,
673+ " name " : " Generate tag" ,
674+ " run " : " BUILD_SCM_REVISION=$(git rev-parse --short HEAD)\n BUILD_SCM_TIMESTAMP=$(TZ=UTC date --date \" @$(git show -s --format=%ct HEAD)\" +%Y%m%dT%H%M%SZ)\n RELEASE_TAG=\" ${BUILD_SCM_TIMESTAMP}-${BUILD_SCM_REVISION}}\"\n git tag -a $RELEASE_TAG\n git push --follow-tags\n echo \" release_tag=$RELEASE_TAG\" >> $GITHUB_OUTPUT\n "
675+ },
671676 {
672677 " name " : " Create GitHub release and upload artifacts" ,
673678 " uses " : " softprops/action-gh-release@v2" ,
674679 " with " : {
675680 " files " : " assets/*\n sha256\n " ,
676- " make_latest " : true
681+ " make_latest " : true,
682+ " tag_name " : " ${{ steps.create_tag.outputs.release_tag }}"
677683 }
678684 }
679685 ]
Original file line number Diff line number Diff line change 165165 name: 'Calculate shasum' ,
166166 run: 'shasum -a 256 assets/* > sha256' ,
167167 },
168+ {
169+ name: 'Generate tag' ,
170+ id: 'create_tag' ,
171+ run: |||
172+ BUILD_SCM_REVISION=$(git rev-parse --short HEAD)
173+ BUILD_SCM_TIMESTAMP=$(TZ=UTC date --date "@$(git show -s --format=%ct HEAD)" +%Y%m%dT%H%M%SZ)
174+ RELEASE_TAG="${BUILD_SCM_TIMESTAMP}-${BUILD_SCM_REVISION}}"
175+ git tag -a $RELEASE_TAG
176+ git push --follow-tags
177+ echo "release_tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
178+ ||| ,
179+ },
168180 {
169181 name: 'Create GitHub release and upload artifacts' ,
170182 uses: 'softprops/action-gh-release@v2' ,
171183 with: {
172184 make_latest: true ,
185+ tag_name: '${{ steps.create_tag.outputs.release_tag }}' ,
173186 files: |||
174187 assets/*
175188 sha256
You can’t perform that action at this time.
0 commit comments