ci: always use the same command to upload artifacts (#2153)

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
This commit is contained in:
Edoardo Vacchi
2024-03-12 09:33:10 +01:00
committed by GitHub
parent b4f47d9695
commit 1b3f80b6ef

View File

@@ -181,12 +181,6 @@ jobs:
ls dist
tag="${GITHUB_REF#refs/tags/}"
./.github/workflows/release_notes.sh ${tag} > release-notes.txt
if [[ $VERSION =~ -[a-z]+\. ]]; then
# If it is a pre-release (e.g. it contains `-pre.`) create release notes without artifacts.
gh release create ${tag} --draft --notes-file release-notes.txt --title ${GITHUB_REF#refs/tags/}
else
# Otherwise upload artifacts.
gh release create ${tag} --draft --notes-file release-notes.txt --title ${GITHUB_REF#refs/tags/} ./dist/*
fi
gh release create ${tag} --draft --notes-file release-notes.txt --title ${GITHUB_REF#refs/tags/} ./dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}