Bypass Actions artifact quota for the snapshot build branch

The native runners successfully package every requested platform, but Actions artifact upload is blocked by the repository storage quota. This workflow revision sends build outputs to a temporary draft GitHub release instead so the binaries remain downloadable for Cloudflare publication.

Constraint: GitHub Actions artifact storage quota is exhausted for this repository
Rejected: Continue using actions/upload-artifact | every build finished packaging and then failed on upload
Confidence: medium
Scope-risk: narrow
Directive: This release-upload path is for the temporary snapshot branch; do not keep it on the main workflow without deciding how permanent release transport should work
Tested: prior run packaged macOS, Windows x64-ia32, Windows arm64, Linux x64, and Linux arm64 before upload failure
Not-tested: Draft-release upload path before rerun
This commit is contained in:
ZacharyZhang-NY committed 2026-04-04 03:40:59 -04:00
1 parent b772e1c758
commit 4df7f600d8
1 file changed
+60 -29
+60 -29
View File
@@ -19,6 +19,7 @@ concurrency:
env: env:
PNPM_VERSION: '10.24.0' PNPM_VERSION: '10.24.0'
NODE_VERSION: '22' NODE_VERSION: '22'
CI_RELEASE_TAG: ci-build-${{ github.run_id }}
jobs: jobs:
# ───────────────────────────────────────────── # ─────────────────────────────────────────────
@@ -69,6 +70,8 @@ jobs:
name: macOS (${{ matrix.arch }}) name: macOS (${{ matrix.arch }})
runs-on: ${{ matrix.runner }} runs-on: ${{ matrix.runner }}
needs: test needs: test
permissions:
contents: write
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -105,20 +108,30 @@ jobs:
APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- uses: actions/upload-artifact@v4 - name: Upload release files
with: env:
name: macos-${{ matrix.arch }} GH_TOKEN: ${{ github.token }}
path: | run: |
build/release/*.dmg gh release view "$CI_RELEASE_TAG" >/dev/null 2>&1 || \
build/release/*.zip gh release create "$CI_RELEASE_TAG" \
build/release/*.blockmap --draft \
build/release/latest-mac.yml --prerelease \
if-no-files-found: error --title "CI Build $GITHUB_RUN_ID" \
--notes "Temporary build artifact transport for Cloudflare publication." \
--target "$GITHUB_SHA"
gh release upload "$CI_RELEASE_TAG" \
build/release/*.dmg \
build/release/*.zip \
build/release/*.blockmap \
build/release/latest-mac.yml \
--clobber
build-windows: build-windows:
name: Windows (${{ matrix.arch }}) name: Windows (${{ matrix.arch }})
runs-on: windows-latest runs-on: windows-latest
needs: test needs: test
permissions:
contents: write
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -144,19 +157,30 @@ jobs:
env: env:
CSC_LINK: ${{ secrets.WIN_CERTIFICATE_P12_BASE64 }} CSC_LINK: ${{ secrets.WIN_CERTIFICATE_P12_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.WIN_CERTIFICATE_PASSWORD }} CSC_KEY_PASSWORD: ${{ secrets.WIN_CERTIFICATE_PASSWORD }}
- uses: actions/upload-artifact@v4 - name: Upload release files
with: shell: bash
name: windows-${{ matrix.arch }} env:
path: | GH_TOKEN: ${{ github.token }}
build/release/*.exe run: |
build/release/*.blockmap gh release view "$CI_RELEASE_TAG" >/dev/null 2>&1 || \
build/release/latest.yml gh release create "$CI_RELEASE_TAG" \
if-no-files-found: error --draft \
--prerelease \
--title "CI Build $GITHUB_RUN_ID" \
--notes "Temporary build artifact transport for Cloudflare publication." \
--target "$GITHUB_SHA"
gh release upload "$CI_RELEASE_TAG" \
build/release/*.exe \
build/release/*.blockmap \
build/release/latest.yml \
--clobber
build-linux: build-linux:
name: Linux (${{ matrix.arch }}) name: Linux (${{ matrix.arch }})
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: test needs: test
permissions:
contents: write
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -182,20 +206,27 @@ jobs:
run: pnpm exec electron-vite build run: pnpm exec electron-vite build
- name: Package - name: Package
run: pnpm exec electron-builder ${{ matrix.builder_args }} --config electron-builder.yml --publish never run: pnpm exec electron-builder ${{ matrix.builder_args }} --config electron-builder.yml --publish never
- uses: actions/upload-artifact@v4 - name: Upload release files
with: env:
name: linux-${{ matrix.arch }} GH_TOKEN: ${{ github.token }}
path: | run: |
build/release/*.AppImage gh release view "$CI_RELEASE_TAG" >/dev/null 2>&1 || \
build/release/*.deb gh release create "$CI_RELEASE_TAG" \
build/release/*.rpm --draft \
build/release/*.snap --prerelease \
build/release/*.blockmap --title "CI Build $GITHUB_RUN_ID" \
build/release/latest-linux.yml --notes "Temporary build artifact transport for Cloudflare publication." \
if-no-files-found: warn --target "$GITHUB_SHA"
gh release upload "$CI_RELEASE_TAG" \
build/release/*.AppImage \
build/release/*.deb \
build/release/*.rpm \
build/release/*.blockmap \
build/release/latest-linux.yml \
--clobber
# ───────────────────────────────────────────── # ─────────────────────────────────────────────
# Stage 4: Publish to GitHub Releases # Stage 4: Publish Release
# ───────────────────────────────────────────── # ─────────────────────────────────────────────
release: release:
name: Publish Release name: Publish Release