Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -668,12 +668,18 @@
"name": "Calculate shasum",
"run": "shasum -a 256 assets/* > sha256"
},
{
"id": "create_tag",
"name": "Generate tag",
"run": "BUILD_SCM_REVISION=$(git rev-parse --short HEAD)\nBUILD_SCM_TIMESTAMP=$(TZ=UTC date --date \"@$(git show -s --format=%ct HEAD)\" +%Y%m%dT%H%M%SZ)\nRELEASE_TAG=\"${BUILD_SCM_TIMESTAMP}-${BUILD_SCM_REVISION}}\"\ngit tag -a $RELEASE_TAG\ngit push --follow-tags\necho \"release_tag=$RELEASE_TAG\" >> $GITHUB_OUTPUT\n"
},
{
"name": "Create GitHub release and upload artifacts",
"uses": "softprops/action-gh-release@v2",
"with": {
"files": "assets/*\nsha256\n",
"make_latest": true
"make_latest": true,
"tag_name": "${{ steps.create_tag.outputs.release_tag }}"
}
}
]
Expand Down
13 changes: 13 additions & 0 deletions tools/github_workflows/workflows_template.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,24 @@
name: 'Calculate shasum',
run: 'shasum -a 256 assets/* > sha256',
},
{
name: 'Generate tag',
id: 'create_tag',
run: |||
BUILD_SCM_REVISION=$(git rev-parse --short HEAD)
BUILD_SCM_TIMESTAMP=$(TZ=UTC date --date "@$(git show -s --format=%ct HEAD)" +%Y%m%dT%H%M%SZ)
RELEASE_TAG="${BUILD_SCM_TIMESTAMP}-${BUILD_SCM_REVISION}}"
git tag -a $RELEASE_TAG
git push --follow-tags
echo "release_tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
|||,
},
{
name: 'Create GitHub release and upload artifacts',
uses: 'softprops/action-gh-release@v2',
with: {
make_latest: true,
tag_name: '${{ steps.create_tag.outputs.release_tag }}',
files: |||
assets/*
sha256
Expand Down