Skip to content

Commit b87513c

Browse files
committed
ci: add short git commit SHA to GitHub release
1 parent 0bce8d0 commit b87513c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/build-deb.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,16 @@ jobs:
8181
uses: actions/download-artifact@v4
8282
with:
8383
name: postgresql-ulid-deb
84+
- name: Set short git commit SHA
85+
id: vars
86+
run: |
87+
calculatedSha=$(git rev-parse --short ${{ github.sha }})
88+
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
8489
- name: Create Release
8590
uses: ncipollo/release-action@v1
8691
with:
8792
artifacts: "postgresql-${{ env.PG_VERSION }}-ulid_${{ env.VERSION }}_amd64.deb"
88-
name: Release ${{ github.sha | slice(0, 7) }}
89-
tag: ${{ github.sha | slice(0, 7) }}
93+
name: Release ${{ env.COMMIT_SHORT_SHA }}
94+
tag: ${{ env.COMMIT_SHORT_SHA }}
9095
draft: false
9196
prerelease: false

0 commit comments

Comments
 (0)