Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,25 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: ./scripts/check-loc.sh

# Mirrors lefthook.yml's own workflow-yaml job -- same script, plus
# actionlint for semantic checks the parse can't see. Unconditional
# like file-loc-limit: GitHub only parses a workflow when its trigger
# fires, so a syntax error in a tag-triggered workflow otherwise
# merges through green CI and detonates at release time (v0.2.0's
# first run).
workflow-lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: ./scripts/check-workflow-yaml.sh
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: '1.25'
cache: false
- run: go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.7
- run: actionlint

# Mirrors lefthook.yml's own comment-hygiene job -- same script
# (.claude/rules/comments.md is the standard it enforces). Grep-only,
# so like file-loc-limit it needs no build setup and no changes gate.
Expand Down Expand Up @@ -421,6 +440,7 @@ jobs:
needs:
- changes
- file-loc-limit
- workflow-lint
- comment-hygiene
- ui-copy
- rules-frontmatter
Expand Down
29 changes: 20 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,13 @@ jobs:
node-version: '22'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- uses: arduino/setup-task@c0bc642852239c2689f73f4ea6459c29405f3c52 # v3.0.0
- name: Install wails3 CLI
run: go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-beta.6
# Task installed via go install, not arduino/setup-task: the tool
# itself is MIT but that ACTION wrapper is GPL-3.0, which trips
# dependency-review's deny-licenses on any PR touching this file.
- name: Install Task and wails3 CLI
run: |
go install github.com/go-task/task/v3/cmd/task@v3.52.0
go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-beta.6
# task build already chains: go mod tidy -> generate icons -> install
# frontend deps -> generate bindings -> frontend build -> go build.
# No GoReleaser (see ADR-0002 / wailsapp/wails#747, closed wont-fix) --
Expand Down Expand Up @@ -116,15 +120,22 @@ jobs:
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
# --notes text is prepended to the generated notes; the app is
# ad-hoc signed (no Apple Developer ID), so first launch needs
# the standard right-click -> Open confirmation.
# --notes-file text is prepended to the generated notes; the app
# is ad-hoc signed (no Apple Developer ID), so first launch
# needs the standard right-click -> Open confirmation. Notes are
# built line-by-line into a file: every line of a run:| block
# must stay indented (an unindented continuation terminates the
# literal scalar -- the v0.2.0 first-run failure), and backticks
# must stay escaped inside double quotes (command substitution).
run: |
{
echo "## Install"
echo ""
echo "Download the \`.zip\`, unzip, and drag \`mill.app\` to Applications — no build needed. First launch: **right-click the app → Open → Open** (it is ad-hoc signed, not notarized — macOS asks once). Verify the download came from this repo's CI: \`gh attestation verify <the .zip> -R ${GITHUB_REPOSITORY}\`. Prefer building from source? \`git clone\` + the README's few commands work on any Mac."
} > /tmp/release-notes.md
gh release create "${GITHUB_REF_NAME}" \
--repo "${GITHUB_REPOSITORY}" \
--title "${GITHUB_REF_NAME}" \
--generate-notes \
--notes "## Install

Download the \`.zip\`, unzip, and drag \`mill.app\` to Applications — no build needed. First launch: **right-click the app → Open → Open** (it is ad-hoc signed, not notarized — macOS asks once). Verify the download came from this repo's CI: \`gh attestation verify <the .zip> -R ${GITHUB_REPOSITORY}\`. Prefer building from source? \`git clone\` + the README's few commands work on any Mac." \
--notes-file /tmp/release-notes.md \
dist/*
3 changes: 3 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ pre-commit:
- name: file-loc-limit
glob: "*.{go,ts,tsx}"
run: ./scripts/check-loc.sh
- name: workflow-yaml
glob: ".github/workflows/*.yml"
run: ./scripts/check-workflow-yaml.sh
- name: comment-hygiene
glob: "*.{go,ts,tsx}"
run: ./scripts/check-comment-hygiene.sh
Expand Down
21 changes: 21 additions & 0 deletions scripts/check-workflow-yaml.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Every .github/workflows/*.yml must parse as YAML. GitHub only parses a
# workflow when its trigger fires, so a syntax error in a rarely-fired
# workflow (release.yml runs only on tags) can merge through green CI
# and fail at the worst moment -- exactly what happened to v0.2.0's
# first run: a run:| block's unindented continuation line terminated
# the literal scalar. Parse-only here (no new local tooling; python3 +
# PyYAML ship with macOS dev setups and ubuntu runners); CI's
# workflow-lint job additionally runs actionlint for semantic checks.
set -euo pipefail
cd "$(dirname "$0")/.."

fail=0
for f in .github/workflows/*.yml; do
if ! python3 -c "import yaml, sys; yaml.safe_load(open(sys.argv[1]))" "$f" 2>/tmp/workflow-yaml-err; then
echo "INVALID YAML: $f"
cat /tmp/workflow-yaml-err
fail=1
fi
done
exit $fail
Loading