知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.
Swift androidlinuxlive-captionsmacosmeeting-notesmenubar-appsimultaneous-interpretationspeech-recognitionsubtitlesswiftswiftuitranslationwindows
build: let the release workflow rerun for an existing release
wquguruef80382819c2
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 57d6ec3..82c5fb3 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -3,27 +3,45 @@ name: releaseon:push:tags: ["v*.*.*"]+ # Rebuild an existing release, e.g. after its tag was moved: Actions › release › Run workflow.+ workflow_dispatch:+ inputs:+ tag:+ description: "Tag to build, e.g. v2.1.0"+ required: truepermissions:contents: write+env:+ TAG: ${{ inputs.tag || github.ref_name }}+jobs:release:runs-on: macos-26steps:- uses: actions/checkout@v4+ with:+ ref: ${{ env.TAG }}- name: Check the tag matches Info.plistrun: |PLIST=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" Resources/Info.plist)- [[ "v$PLIST" == "$GITHUB_REF_NAME" ]] || { echo "tag $GITHUB_REF_NAME != Info.plist $PLIST"; exit 1; }+ [[ "v$PLIST" == "$TAG" ]] || { echo "tag $TAG != Info.plist $PLIST"; exit 1; }- name: Build and packagerun: scripts/package.shenv:BUILD_NUMBER: ${{ github.run_number }}- name: Publish the release+ # A tag pushed again (history rewritten, tag moved) must not fail on the existing release:+ # replace its files and notes instead.run: |- scripts/release_notes.sh "${GITHUB_REF_NAME#v}" > build/notes.md- gh release create "$GITHUB_REF_NAME" build/Cicada-*.dmg build/Cicada-*.zip build/checksums.txt \- --title "知了 Cicada ${GITHUB_REF_NAME#v}" --notes-file build/notes.md+ scripts/release_notes.sh "${TAG#v}" > build/notes.md+ if gh release view "$TAG" >/dev/null 2>&1; then+ gh release upload "$TAG" build/Cicada-*.dmg build/Cicada-*.zip build/checksums.txt --clobber+ gh release edit "$TAG" --notes-file build/notes.md+ else+ gh release create "$TAG" build/Cicada-*.dmg build/Cicada-*.zip build/checksums.txt \+ --title "知了 Cicada ${TAG#v}" --notes-file build/notes.md+ fienv:GH_TOKEN: ${{ github.token }}