Spaces:
Paused
Paused
icebear0828 commited on
Commit ·
dd4a13a
1
Parent(s): 11b0259
fix: use --publish never + manual upload for macOS x64 build
Browse fileselectron-builder's publisher tries to manage ALL release assets during
upload, causing 422 conflicts when arm64 assets already exist. x64 now
builds with --publish never and manually uploads only its own artifacts.
- .github/workflows/release.yml +13 -13
.github/workflows/release.yml
CHANGED
|
@@ -145,25 +145,25 @@ jobs:
|
|
| 145 |
working-directory: packages/electron
|
| 146 |
run: node electron/prepare-pack.mjs
|
| 147 |
|
| 148 |
-
- name:
|
| 149 |
-
|
|
|
|
|
|
|
|
|
|
| 150 |
run: |
|
| 151 |
TAG="${{ inputs.tag || github.ref_name }}"
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
|
|
|
|
|
|
|
|
|
| 157 |
done
|
| 158 |
env:
|
| 159 |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 160 |
|
| 161 |
-
- name: Pack (mac-x64)
|
| 162 |
-
working-directory: packages/electron
|
| 163 |
-
run: npx electron-builder --config electron-builder.yml --mac --x64 --publish always
|
| 164 |
-
env:
|
| 165 |
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 166 |
-
|
| 167 |
release:
|
| 168 |
needs: [build, build-mac-x64]
|
| 169 |
runs-on: ubuntu-latest
|
|
|
|
| 145 |
working-directory: packages/electron
|
| 146 |
run: node electron/prepare-pack.mjs
|
| 147 |
|
| 148 |
+
- name: Pack (mac-x64)
|
| 149 |
+
working-directory: packages/electron
|
| 150 |
+
run: npx electron-builder --config electron-builder.yml --mac --x64 --publish never
|
| 151 |
+
|
| 152 |
+
- name: Upload x64 artifacts to release
|
| 153 |
run: |
|
| 154 |
TAG="${{ inputs.tag || github.ref_name }}"
|
| 155 |
+
cd packages/electron/release
|
| 156 |
+
for f in *; do
|
| 157 |
+
[ -f "$f" ] || continue
|
| 158 |
+
# Skip arm64 files and yml manifests (arm64 build already uploaded these)
|
| 159 |
+
echo "$f" | grep -qi "arm64" && continue
|
| 160 |
+
echo "$f" | grep -qiE "\.yml$" && continue
|
| 161 |
+
echo "Uploading: $f"
|
| 162 |
+
gh release upload "$TAG" "$f" --clobber 2>/dev/null || true
|
| 163 |
done
|
| 164 |
env:
|
| 165 |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
release:
|
| 168 |
needs: [build, build-mac-x64]
|
| 169 |
runs-on: ubuntu-latest
|