New checks - security.yml: dependency-review blocks PRs that add a high/critical advisory; actionlint + zizmor lint the workflows themselves (template injection, permissions, credential persistence, unpinned uses); OpenSSF Scorecard weekly and on main (published, not uploaded as alerts). - compliance.yml: REUSE lint over the whole repo (REUSE.toml + LICENSES/, no per-file headers) and Conventional-Commit PR titles. - rust.yml (src-tauri changes + weekly): rustfmt, clippy -D warnings, cargo test, and cargo-deny for RustSec advisories, licenses and sources. - ci.yml `check` gains: coverage thresholds (src/engine, worker), check:licenses, check:bundle, and a `wrangler deploy --dry-run`. Licensing - THIRD_PARTY_NOTICES.md is now generated from package.json, the installed packages and Cargo.toml/Cargo.lock (`npm run generate:third-party`); CI fails when it is stale or when anything bundled into the app carries a license outside the allowlist. It had drifted to React 18 / Vite 7 / Tailwind 3. - Vite's build.license emits the full text of every bundled package's license to /licenses/third-party.md (served publicly, before the gate). Bundle budget - scripts/check-bundle-size.ts measures what CLAUDE.md's "500KB" never defined: initial load (everything index.html references) <= 280 KB gzip (197 KB today) and no JS chunk over 500 KB raw. Coverage - @vitest/coverage-v8; thresholds sit just under today's numbers. The engine is at 89% lines / 64% functions — not the 100% CLAUDE.md claimed. Supply chain - Every third-party action pinned to a commit SHA (Dependabot updates the SHA and its version comment); checkout never persists credentials. - Release workflows: a `verify` job (typecheck, tests, version sync, Tauri alignment, tag == package version) gates the build; no dependency caches in release jobs; permissions granted per job. - Reusable Discord workflows receive only the secrets they declare instead of `secrets: inherit` (which exposed the Android signing keys to them). - Rust: cargo-deny found RUSTSEC-2026-0194/0195 (quick-xml DoS, via plist) that Dependabot had not raised; plist 1.10 brings quick-xml 0.41. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
128 lines
5.2 KiB
YAML
128 lines
5.2 KiB
YAML
name: Release Desktop
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*"]
|
|
# Manual re-run hook — lets us rebuild a release without deleting +
|
|
# recreating the tag. Useful when a transient runner failure (e.g.
|
|
# the macOS DMG bundler hitting an AppleScript flake) costs us one
|
|
# arch's binary on an otherwise-shipped tag.
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: "Tag to build (e.g. v1.0.0). The job still expects the manifests to already carry this version."
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
# Nothing gets built for a tag whose code does not pass the gate or whose
|
|
# six version fields disagree with the tag itself.
|
|
verify:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
ref: ${{ github.event.inputs.tag || github.ref }}
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
node-version-file: .node-version
|
|
- run: npm ci
|
|
- run: npm run typecheck
|
|
- run: npm run test:run
|
|
- run: npm run check:version
|
|
- run: npm run check:tauri
|
|
- name: Tag matches the manifests
|
|
env:
|
|
TAG: ${{ github.event.inputs.tag || github.ref_name }}
|
|
run: |
|
|
version="v$(node -p "require('./package.json').version")"
|
|
if [ "$version" != "$TAG" ]; then
|
|
echo "::error::Tag $TAG does not match package.json ($version)"
|
|
exit 1
|
|
fi
|
|
|
|
build:
|
|
needs: verify
|
|
permissions:
|
|
contents: write # create the draft release and upload the binaries
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
# windows-latest serves the windows-2025-vs2026 image (VS 2026
|
|
# toolchain) from June 15, 2026. Tauri build (MSI + NSIS)
|
|
# verified on that exact image 2026-06-12, actions run
|
|
# 27388695090 — no runner pin needed.
|
|
- os: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
# Default Windows bundles: MSI + NSIS (.exe). Both ship.
|
|
bundleArgs: ""
|
|
- os: macos-14
|
|
target: aarch64-apple-darwin
|
|
# macOS DMG bundling on hosted runners flakes inside
|
|
# `bundle_dmg.sh` (the AppleScript that sets icon
|
|
# positions in the DMG window times out on the headless
|
|
# runner). Build only the `.app` bundle; tauri-action
|
|
# tar.gzips it into a `.app.tar.gz` for upload. Users
|
|
# expand and drag-drop into /Applications.
|
|
#
|
|
# Intel macOS (x86_64) is NOT built — the `macos-13`
|
|
# free runner queue is functionally unavailable since
|
|
# GitHub started deprecating it. Revisit with a
|
|
# `universal-apple-darwin` build on this same runner if
|
|
# Intel support becomes a priority.
|
|
bundleArgs: "--bundles app"
|
|
- os: ubuntu-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
# Default Linux bundles: AppImage + deb. Both ship.
|
|
bundleArgs: ""
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
# On `workflow_dispatch` checkout the requested tag; on a
|
|
# tag push we already get the tag commit by default.
|
|
ref: ${{ github.event.inputs.tag || github.ref }}
|
|
persist-credentials: false
|
|
# No dependency caches in a release job: a poisoned cache entry written
|
|
# by any other workflow would otherwise flow straight into the binaries.
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
node-version-file: .node-version
|
|
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
|
|
with:
|
|
toolchain: stable
|
|
targets: ${{ matrix.target }}
|
|
- name: Install Linux dependencies
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
libwebkit2gtk-4.1-dev \
|
|
libgtk-3-dev \
|
|
libayatana-appindicator3-dev \
|
|
librsvg2-dev \
|
|
patchelf
|
|
- run: npm ci
|
|
- uses: tauri-apps/tauri-action@1deb371b0cd8bd54025b384f1cd735e725c4060f # v1.0.0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# AppImage bundling on hosted runners flakes: linuxdeploy (itself
|
|
# an AppImage) needs FUSE to mount, which GitHub runners don't
|
|
# reliably provide → "failed to run linuxdeploy". Extract-and-run
|
|
# avoids FUSE; NO_STRIP skips a strip pass that also intermittently
|
|
# fails. (No-op on Windows / macOS.) Transient CDN 504s while
|
|
# *fetching* linuxdeploy are handled by re-running the job.
|
|
APPIMAGE_EXTRACT_AND_RUN: 1
|
|
NO_STRIP: true
|
|
with:
|
|
tagName: ${{ github.event.inputs.tag || 'v__VERSION__' }}
|
|
releaseName: "YTDescGen ${{ github.event.inputs.tag || 'v__VERSION__' }}"
|
|
releaseBody: "See the assets to download the installer for your platform."
|
|
releaseDraft: true
|
|
args: ${{ matrix.bundleArgs }} --target ${{ matrix.target }}
|