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
5 changes: 4 additions & 1 deletion .github/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ Before authorizing publication, retain:
release branch. [Aronrepo](https://github.com/1aron/aronrepo/tree/main/packages/aronrepo)
decides the version, tag and notes from the commits since the channel's last
`v*` tag with this repository's `explicit` policy, the same rules as the commit
hook, the PR title check and `bun x aronrepo explain`. The script then runs
hook, the PR title check, the pushed-commit check (`commit-check.yml`) and
`bun x aronrepo explain`. Only commits that change the release paths in
`aronrepo.config.js` (every package, the Rust crates and the build
configuration that compiles them) release a version. The script then runs
workspace publication, the cohort promotion next, and GitHub release creation
last, with the assets in `aronrepo.config.js`. The workspace module publishes
dependencies before their dependents, including optional and peer dependencies
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/commit-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check pushed commits
on:
push:
branches: [main, alpha, beta, rc, canary]

permissions:
contents: read

jobs:
check:
# The commit hook and the PR title check already apply this policy; a direct push can skip
# both (--no-verify, rebuilt or web-edited commits), so check every pushed commit again here.
# It reports without gating the release, which resolves such a commit to no release anyway.
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
# Only aronrepo runs here, so skip husky and every package postinstall.
- uses: ./.github/actions/setup-bun
with:
turbo-cache: "false"
ignore-scripts: "true"
- name: Check every pushed commit against the release policy
env:
BEFORE: ${{ github.event.before }}
AFTER: ${{ github.sha }}
run: |
set -euo pipefail
# A new branch has no previous tip, and a force push may drop it; check the head commit then.
if [[ "$BEFORE" =~ ^0+$ ]] || ! git cat-file -e "${BEFORE}^{commit}" 2>/dev/null; then
from="${AFTER}~1"
else
from="$BEFORE"
fi
bun x aronrepo check --from "$from" --to "$AFTER"
43 changes: 9 additions & 34 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,40 +137,15 @@ Non-release defaults:

Only changes to these files can release a version:

- `packages/astro/**`
- `packages/binding/**`
- `packages/binding-darwin-arm64/**`
- `packages/binding-darwin-x64/**`
- `packages/binding-linux-arm64-gnu/**`
- `packages/binding-linux-arm64-musl/**`
- `packages/binding-linux-x64-gnu/**`
- `packages/binding-linux-x64-musl/**`
- `packages/binding-wasm-compiler/**`
- `packages/binding-wasm-engine/**`
- `packages/binding-wasm-tooling/**`
- `packages/binding-win32-arm64-msvc/**`
- `packages/binding-win32-x64-msvc/**`
- `packages/cli/**`
- `packages/compiler/**`
- `packages/create/**`
- `packages/css/**`
- `packages/css-sv/**`
- `packages/eslint-config/**`
- `packages/eslint-plugin/**`
- `packages/language-server/**`
- `packages/language-service/**`
- `packages/mcp/**`
- `packages/next/**`
- `packages/nuxt/**`
- `packages/preset/**`
- `packages/runtime/**`
- `packages/schema/**`
- `packages/server/**`
- `packages/svelte/**`
- `packages/tooling/**`
- `packages/vite/**`
- `packages/vscode/**`
- `packages/webpack/**`
- `packages/**`
- `!packages/*/playground/**`
- `crates/**`
- `!crates/xtask/**`
- `!crates/**/tests.rs`
- `Cargo.toml`
- `Cargo.lock`
- `rust-toolchain.toml`
- `shared/tsdown-package.config.ts`

Excluding: `**/tests/**`, `**/test/**`, `**/__tests__/**`, `**/*.{test,spec}.*`, `**/*.test-d.*`, `**/__snapshots__/**`, `**/__fixtures__/**`, `**/__mocks__/**`, `**/fixtures/**`, `**/benchmarks/**`, `**/examples/**`, `**/CHANGELOG.md`, `.github/**`, `.husky/**`.

Expand Down
16 changes: 16 additions & 0 deletions aronrepo.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ export default {
release: {
// Only the owner raises minor and major versions, with Bump(Minor) and Bump(Major) commits.
mode: 'explicit',
// Files whose changes ship to npm, so only their commits may use a release type.
// Derived paths would cover public packages only, but the Rust crates compile into the
// binding packages and the private internal and engine-js workspaces are bundled into them.
paths: {
include: [
'packages/**',
'!packages/*/playground/**',
'crates/**',
'!crates/xtask/**',
'!crates/**/tests.rs',
'Cargo.toml',
'Cargo.lock',
'rust-toolchain.toml',
'shared/tsdown-package.config.ts'
]
},
// scripts/release.mjs attaches these to the GitHub release after npm promotion.
assets: [
{ path: 'release-artifacts/release-notes.md', name: 'release-notes-{tag}.md', label: 'Complete release notes' },
Expand Down
Loading