@@ -29,39 +29,13 @@ jobs:
2929 needs : check
3030 runs-on : ubuntu-latest
3131 steps :
32- - name : Create or refresh GitHub Release
33- env :
34- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35- REPO : ${{ github.repository }}
36- TAG : ${{ needs.check.outputs.tag }}
37- VERSION : ${{ needs.check.outputs.version }}
38- RELEASE_NOTES : ${{ needs.check.outputs.notes }}
39- shell : bash
40- run : |
41- set -euo pipefail
42- if gh release view "$TAG" -R "$REPO" >/dev/null 2>&1; then
43- gh release edit "$TAG" -R "$REPO" \
44- --title "app v${VERSION}" \
45- --notes "$RELEASE_NOTES"
46- else
47- gh release create "$TAG" -R "$REPO" \
48- --target "$GITHUB_SHA" \
49- --title "app v${VERSION}" \
50- --notes "$RELEASE_NOTES"
51- fi
52-
53- gh api "/repos/$REPO/releases/tags/$TAG" --jq '.assets[] | "\(.id)\t\(.name)"' |
54- while IFS=$'\t' read -r id name; do
55- case "$name" in
56- "sbot_${VERSION}_android.apk"|"sbot_${VERSION}_android.aab"|"sbot_${VERSION}_ios_unsigned.ipa"|sbot-vscode-*.vsix)
57- continue
58- ;;
59- "latest.json"|"latest-app.json"|"sbot.app.tar.gz"|"sbot.app.tar.gz.sig"|sbot_*.app.tar.gz|sbot_*.app.tar.gz.sig|sbot_${VERSION}_*)
60- echo "delete stale release asset: $name"
61- gh api -X DELETE "/repos/$REPO/releases/assets/$id" >/dev/null
62- ;;
63- esac
64- done
32+ - name : Recreate GitHub Release
33+ uses : while-coder/workflows/.github/actions/recreate-github-release@main
34+ with :
35+ github-token : ${{ secrets.GITHUB_TOKEN }}
36+ tag : ${{ needs.check.outputs.tag }}
37+ title : app v${{ needs.check.outputs.version }}
38+ notes : ${{ needs.check.outputs.notes }}
6539
6640 release-desktop :
6741 needs : [check, prepare-release]
0 commit comments