fix: handle existing GitHub releases in workflow (#232)

This commit is contained in:
Chris Tate
2026-01-23 15:55:18 -06:00
committed by GitHub
parent c0fd1be132
commit 8c2a6ec5d2
2 changed files with 18 additions and 4 deletions
+13 -4
View File
@@ -252,9 +252,18 @@ jobs:
- name: Create GitHub Release
run: |
VERSION=$(node -p "require('./package.json').version")
gh release create "v$VERSION" \
--title "v$VERSION" \
--generate-notes \
bin/agent-browser-*
TAG="v$VERSION"
# Check if release already exists
if gh release view "$TAG" &>/dev/null; then
echo "Release $TAG already exists, uploading binaries..."
gh release upload "$TAG" bin/agent-browser-* --clobber
else
echo "Creating release $TAG..."
gh release create "$TAG" \
--title "$TAG" \
--generate-notes \
bin/agent-browser-*
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}