Skip to content

Commit 9dc3889

Browse files
committed
Use short sha for github release name
1 parent dbeaea4 commit 9dc3889

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

.github/workflows/release-testing.yaml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ jobs:
250250
- name: Set Version
251251
shell: bash
252252
run: |
253-
echo "VERSION=${{ github.sha }}" >> $GITHUB_ENV
254-
echo "RELEASE_VERSION=${{ github.sha }}" >> $GITHUB_ENV
253+
echo "VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
255254
- name: Retrieve built artifact
256255
uses: actions/download-artifact@v4
257256
with:
@@ -265,18 +264,10 @@ jobs:
265264
cat dist/sha256sum.txt
266265
- name: Create or update Release
267266
run: |
268-
echo "Looking for existing release for ${{ env.RELEASE_VERSION }}"
269-
OLD_TAG=$(gh release ls --json name,tagName | jq -r ".[] | select(.name == \"${{ env.RELEASE_VERSION }}\") | .tagName")
270-
if [ -n "$OLD_TAG" ]; then
271-
echo "Updating release ${{ env.RELEASE_VERSION }} to point to new tag ${{ github.sha }}"
272-
gh release edit ${OLD_TAG} --tag ${{ github.sha }}
273-
else
274-
echo "Creating new release ${{ env.RELEASE_VERSION }} pointing to tag ${{ github.sha }}"
275-
gh release create ${{ github.sha }} \
276-
--title ${{ env.RELEASE_VERSION }} \
277-
--draft \
278-
--generate-notes \
279-
--prerelease
280-
fi
281-
echo "Uploading artifacts for tag ${{ github.sha }}"
282-
gh release upload ${{ github.sha }} dist/* --clobber
267+
echo "Creating new release ${{ env.VERSION }} pointing to tag ${{ env.VERSION }}"
268+
gh release create ${{ env.VERSION }} \
269+
--title ${{ env.VERSION }} \
270+
--generate-notes \
271+
--prerelease
272+
echo "Uploading artifacts for tag ${{ env.VERSION }}"
273+
gh release upload ${{ env.VERSION }} dist/* --clobber

0 commit comments

Comments
 (0)