Skip to content

Commit bfcd5e4

Browse files
committed
Fix CI publish-release: upload to existing release instead of --clobber (v3.2.5)
The publish-release job failed because gh release create --clobber is not supported in the CI runner's gh version. Changed to a two-step approach: check if the release already exists (from manual gh release create), and if so, upload artifacts with gh release upload --clobber. Otherwise create a new release. This handles both cases without the delete+create race.
1 parent 5850ba2 commit bfcd5e4

2 files changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,18 @@ jobs:
134134
echo "No release artifacts found."
135135
exit 1
136136
fi
137-
# --clobber replaces an existing release atomically (no delete+create race)
138-
gh release create "$tag" "${files[@]}" \
139-
--repo "$GITHUB_REPOSITORY" \
140-
--title "$tag" \
141-
--latest \
142-
--clobber
137+
# Upload assets to existing release, or create new release if none exists.
138+
# This avoids the --clobber flag (unsupported in older gh) and the
139+
# delete+create race condition.
140+
if gh release view "$tag" --repo "$GITHUB_REPOSITORY" &>/dev/null; then
141+
echo "Release $tag already exists — uploading artifacts"
142+
gh release upload "$tag" "${files[@]}" \
143+
--repo "$GITHUB_REPOSITORY" \
144+
--clobber
145+
else
146+
echo "Creating release $tag"
147+
gh release create "$tag" "${files[@]}" \
148+
--repo "$GITHUB_REPOSITORY" \
149+
--title "$tag" \
150+
--latest
151+
fi

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "opcore-oneclick",
33
"private": true,
4-
"version": "3.2.4",
4+
"version": "3.2.5",
55
"description": "OpCore-OneClick deployment utility",
66
"author": "OpCore-OneClick contributors",
77
"main": "dist-electron/electron/main.js",

0 commit comments

Comments
 (0)