mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
CI/CD: Fix release to GitHub
GitHub runner images dropped the "hub" tool. Replace with "gh" cli, which now supports editing releases.
This commit is contained in:
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@@ -73,10 +73,7 @@ jobs:
|
|||||||
NOTES: |
|
NOTES: |
|
||||||
[Changelog](https://anymail.dev/en/stable/changelog/#${{ steps.version.outputs.anchor }})
|
[Changelog](https://anymail.dev/en/stable/changelog/#${{ steps.version.outputs.anchor }})
|
||||||
run: |
|
run: |
|
||||||
# gh release create-or-edit "$TAG" --target "$GITHUB_REF" --title "$TITLE" --notes "$NOTES" ./dist/*
|
if ! gh release edit "$TAG" --verify-tag --target "$GITHUB_REF" --title "$TITLE" --notes "$NOTES"; then
|
||||||
# (gh release doesn't support edit - 6/2021)
|
gh release create "$TAG" --verify-tag --target "$GITHUB_REF" --title "$TITLE" --notes "$NOTES"
|
||||||
# (hub requires separate --attach=FILE arg for each file)
|
|
||||||
FILES=(./dist/*)
|
|
||||||
if ! hub release edit --message "$TITLE" --message "$NOTES" "${FILES[@]/#/--attach=}" "$TAG"; then
|
|
||||||
hub release create -t "$GITHUB_SHA" --message "$TITLE" --message "$NOTES" "${FILES[@]/#/--attach=}" "$TAG"
|
|
||||||
fi
|
fi
|
||||||
|
gh release upload "$TAG" ./dist/*
|
||||||
|
|||||||
Reference in New Issue
Block a user