Skip to content

Commit 75904b0

Browse files
committed
test reelease upload
1 parent 10652a6 commit 75904b0

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,20 @@ jobs:
219219
220220
EOF
221221
222-
- name: Create release with assets
222+
- name: Create or update release and upload assets
223223
env:
224-
GH_TOKEN: ${{ github.token }}
224+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
225225
run: |
226+
set -e
226227
TAG=${{ env.TAG }}
227-
gh release create "$TAG" dist/* --title "microtex_rs $TAG" --notes-file release_notes.md || gh release upload "$TAG" dist/* --clobber
228+
# Create the release if it doesn't exist (avoid passing assets to create to prevent directory errors)
229+
if ! gh release view "$TAG" >/dev/null 2>&1; then
230+
gh release create "$TAG" --title "microtex_rs $TAG" --notes-file release_notes.md || true
231+
fi
232+
# Upload only archive files (tar.gz and zip) to avoid directories and raw binaries
233+
gh release upload "$TAG" dist/*.tar.gz dist/*.zip --clobber
228234
229235
- name: Show release URL
230236
env:
231-
GH_TOKEN: ${{ github.token }}
237+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
232238
run: gh release view --json url --jq '.url' ${{ env.TAG }}

0 commit comments

Comments
 (0)