Skip to content

Commit 37ba46e

Browse files
davidtorciviaclaude
andcommitted
ci: reset the nightly release before each main-push build
Nightly uploads only ever added assets, so artifacts from every version since 0.2.0 piled up on the rolling release, and a second push on the same version died with already_exists. A reset-nightly job now deletes the release and tag up front; tauri-action recreates both fresh at the current commit. No-op gate on tag pushes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent c6419ef commit 37ba46e

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,27 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11+
# The nightly release is a rolling "latest main" build, but uploads only
12+
# ever ADDED assets — versioned filenames never collided across pushes,
13+
# so artifacts from every old version accumulated forever (and a second
14+
# push on the same version failed with already_exists). Wipe the release
15+
# and its tag before building so tauri-action recreates both fresh at
16+
# the current commit. Runs as a no-op gate on tag pushes so `needs:`
17+
# stays simple.
18+
reset-nightly:
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
steps:
23+
- name: Delete previous nightly release and tag
24+
if: github.ref_type != 'tag'
25+
env:
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
run: |
28+
gh release delete nightly --repo "${{ github.repository }}" --cleanup-tag --yes || echo "no nightly release to delete"
29+
1130
build:
31+
needs: reset-nightly
1232
permissions:
1333
contents: write
1434
strategy:

0 commit comments

Comments
 (0)