Skip to content

Commit

Permalink
CI/CD: Fix release to GitHub
Browse files Browse the repository at this point in the history
GitHub runner images dropped the "hub"
tool. Replace with "gh" cli, which now
supports editing releases.
  • Loading branch information
medmunds committed Oct 25, 2023
1 parent e15b3ce commit c147754
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ jobs:
NOTES: |
[Changelog](https://anymail.dev/en/stable/changelog/#${{ steps.version.outputs.anchor }})
run: |
# gh release create-or-edit "$TAG" --target "$GITHUB_REF" --title "$TITLE" --notes "$NOTES" ./dist/*
# (gh release doesn't support edit - 6/2021)
# (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"
if ! gh release edit "$TAG" --verify-tag --target "$GITHUB_REF" --title "$TITLE" --notes "$NOTES"; then
gh release create "$TAG" --verify-tag --target "$GITHUB_REF" --title "$TITLE" --notes "$NOTES"
fi
gh release upload "$TAG" ./dist/*

0 comments on commit c147754

Please sign in to comment.