ci(release): stage the release files outside the hidden .output directory

The first tag run of the split release workflow (v1.1.0) failed in "Gate +
package": actions/upload-artifact skips hidden paths by default, `.output`
is one, so `.output/*-chrome.zip` and `.output/SHA256SUMS.txt` matched
nothing and `if-no-files-found: error` stopped the job. The publish job was
skipped, so no Release or asset was created.

The build job now copies both files into a plain `dist/` and uploads that.
The artifact layout the publish and store jobs download is unchanged, and
`include-hidden-files` stays off, so nothing else under `.output` can be
swept into a release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
poli0981andClaude Opus 5.5 committed 2026-10-29 04:13:17 +07:00
1 parent 70f535eeba
commit 9040f84fe2
2 files changed
+12 -4

No files matched your search

+11 -3
View File
@@ -64,12 +64,20 @@ jobs:
working-directory: .output
run: sha256sum *-chrome.zip > SHA256SUMS.txt
# Staged in a plain directory: upload-artifact skips hidden paths by
# default, and `.output` is one. Left there, the upload found nothing and
# the first v1.1.0 tag run failed before any Release existed — the split
# into build and publish jobs had never run on a tag until then.
- name: Stage the release files
run: |
set -euo pipefail
mkdir dist
cp .output/*-chrome.zip .output/SHA256SUMS.txt dist/
- uses: actions/upload-artifact@v7
with:
name: release-${{ github.ref_name }}
path: |
.output/*-chrome.zip
.output/SHA256SUMS.txt
path: dist/
if-no-files-found: error
retention-days: 90
+1 -1
View File
@@ -118,7 +118,7 @@ Four jobs, least privilege first (split 2026-10-28):
| Job | Token | Does |
|---|---|---|
| `build` "Gate + package" | `contents: read` | install, **every CI gate again** (a tag skips the branch triggers, and must never ship what a PR would have blocked), `zip`, `check:manifest`, the tag ↔ manifest version check, `SHA256SUMS.txt`; uploads both files as the artifact `release-<tag>` |
| `build` "Gate + package" | `contents: read` | install, **every CI gate again** (a tag skips the branch triggers, and must never ship what a PR would have blocked), `zip`, `check:manifest`, the tag ↔ manifest version check, `SHA256SUMS.txt`; copies both files into a plain `dist/` and uploads that as the artifact `release-<tag>` — `upload-artifact` skips hidden paths such as `.output/` by default, which failed the first v1.1.0 tag run before any Release existed |
| `publish` "GitHub Release" | `contents: write` | downloads the artifact, `sha256sum -c` it, creates the Release with `--verify-tag` (or re-uploads to an existing one). Installs nothing and runs no repository code — the only job that ever holds a write token |
| `store` "Publish to Chrome Web Store" | `contents: read` | only when the repo variable `CWS_AUTOPUBLISH` is `'true'`: `./node_modules/.bin/wxt submit` with the Release asset — the local binary, never `npx wxt`, which may fetch an unpinned package into an environment holding the four `CHROME_*` secrets (SonarCloud S6505/S8543) |
| `announce` | `contents: read` | Discord, only when `DISCORD_ANNOUNCE` is `'true'` |