Skip to content

Commit

Permalink
ci: Replace assets of existing devel release properly
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangwalther committed May 5, 2024
1 parent c67f1c3 commit 8433f98
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,18 @@ jobs:
echo "Releasing version ${GITHUB_REF_NAME} on GitHub..."
if [ "${GITHUB_REF_NAME}" == "devel" ]; then
gh release edit "${GITHUB_REF_NAME}" \
-t "${GITHUB_REF_NAME}" \
# To replace the existing release, we must first delete the old assets,
# then modify the release, then add the new assets.
gh release view devel --json assets \
| jq -r '.assets[] | .name' \
| xargs -n1 \
gh release delete-asset -y devel
gh release edit devel \
-t devel \
--verify-tag \
-F artifacts/release-changes/CHANGES.md \
--prerelease \
release-bundle/*
--prerelease
gh release upload --clobber devel release-bundle/*
else
gh release create "${GITHUB_REF_NAME}" \
-t "${GITHUB_REF_NAME}" \
Expand Down

0 comments on commit 8433f98

Please sign in to comment.