Completes the Phase 0 scaffold. The app builds, links and renders; no screens yet. Frontend (ARCHITECTURE section 9, UI-SPEC section 2): - React 19 + Vite 8 + Tailwind 4 with the UI-SPEC dark terminal-tech tokens, plus a contrast test asserting WCAG AA over every text/surface pair, which UI-SPEC section 8 requires be verified. - EN and VI catalogs with a test that vi has every en key and no orphans, standing in for the CI parity script I18N section 1 asks for. - A local eslint rule enforcing the no-hardcoded-JSX-strings policy. eslint-plugin-react was the obvious choice but caps at ESLint 9, which drags in six high-severity advisories that would fail npm audit in CI; a local rule also implements the documented allowlist (product name, package names, versions, catalog codes, glyphs) precisely, which react/jsx-no-literals cannot express. Verified it fires on real copy and stays quiet on all five allowed shapes. - no-restricted-imports keeps invoke() out of components, so the "no component calls invoke directly" rule is enforced, not just stated. Tauri (ARCHITECTURE section 7): commands and events only, identifier com.skullmute.pipdock, NSIS and MSI targets, minimal capability set, placeholder icon pending the Phase 3 branding pass. CI (docs/RELEASE-CI.md section 1 as corrected): - ci-rust.yml and release.yml are project-local, on Windows runners, because no reusable Rust or Tauri workflow exists in the ops repo. Windows matters here: env discovery reads the PEP 514 registry and the py launcher, so a Linux run would skip the code most likely to break. - ci-node.yml calls the ops web-react reusable and adds the npm audit job that reusable lacks. - codeql.yml is JS/TS only; CodeQL has no Rust analyzer. - Discord notifiers replace the six-platform notify.yml that never existed. Every caller carries an explicit permissions block. - Action versions checked against the registry rather than assumed: checkout v7, cache v6, gh-release v3, setup-node v6. Two toolchain holds, both forced and both recorded: - TypeScript 6.0.3, not 7: typescript-eslint peers on <6.1.0. - ESLint 10 with eslint-plugin-react dropped, as above. Verified: cargo fmt/clippy -D warnings/28 tests green, tsc clean, 18 vitest tests green, eslint clean, npm audit reports 0 vulnerabilities, vite build and both binaries link. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
98 lines
3.2 KiB
YAML
98 lines
3.2 KiB
YAML
# Project-local: the ops repo has no reusable Tauri/build workflow (docs/RELEASE-CI.md §1).
|
|
#
|
|
# Produces the NSIS .exe and .msi, signs the updater artifacts, publishes SHA256SUMS.txt and
|
|
# leaves a DRAFT release for owner review. Publishing is manual on purpose — RELEASE-CI.md §3.4 —
|
|
# and announce-release.yml fires on `release: published`.
|
|
|
|
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: Tag to build (for re-runs)
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: write # release assets
|
|
|
|
concurrency:
|
|
group: release-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
name: Build · sign · draft
|
|
runs-on: windows-latest
|
|
timeout-minutes: 90
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
ref: ${{ inputs.tag || github.ref }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '24'
|
|
cache: npm
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}
|
|
restore-keys: ${{ runner.os }}-cargo-release-
|
|
|
|
- name: Install frontend dependencies
|
|
run: npm ci
|
|
|
|
- name: Build frontend
|
|
run: npm run build
|
|
|
|
- name: Build, bundle and sign
|
|
env:
|
|
# Private key lives only in Actions secrets (docs/SECURITY.md §5); the matching public
|
|
# key is baked into tauri.conf.json so the app verifies updates before applying them.
|
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
|
run: npx tauri build --locked --bundles nsis,msi,updater
|
|
|
|
- name: Collect artifacts
|
|
shell: pwsh
|
|
run: |
|
|
$out = "release-artifacts"
|
|
New-Item -ItemType Directory -Force $out | Out-Null
|
|
Get-ChildItem -Recurse target\release\bundle `
|
|
-Include *.exe, *.msi, *.zip, *.sig, latest.json |
|
|
ForEach-Object { Copy-Item $_.FullName $out }
|
|
Get-ChildItem $out
|
|
|
|
- name: Publish checksums
|
|
shell: pwsh
|
|
run: |
|
|
# SmartScreen warns on first run because the binaries are not EV-code-signed, so the
|
|
# README tells users to verify these instead (docs/SECURITY.md §5).
|
|
Get-ChildItem release-artifacts -File |
|
|
Where-Object { $_.Name -ne 'SHA256SUMS.txt' } |
|
|
ForEach-Object { "$((Get-FileHash $_.FullName -Algorithm SHA256).Hash.ToLower()) $($_.Name)" } |
|
|
Set-Content release-artifacts\SHA256SUMS.txt -Encoding ascii
|
|
Get-Content release-artifacts\SHA256SUMS.txt
|
|
|
|
- name: Draft GitHub release
|
|
uses: softprops/action-gh-release@v3
|
|
with:
|
|
tag_name: ${{ inputs.tag || github.ref_name }}
|
|
draft: true # owner reviews, then publishes; publishing triggers the announcement
|
|
generate_release_notes: true
|
|
files: release-artifacts/*
|