diff --git a/.claude/skills/pr/SKILL.md b/.claude/skills/pr/SKILL.md index 69c031b..df89cc6 100644 --- a/.claude/skills/pr/SKILL.md +++ b/.claude/skills/pr/SKILL.md @@ -157,6 +157,18 @@ EOF )" ``` -### 9. Return the PR URL +### 9. Turn on auto-merge + +Every nullean repository squash-merges and requires the release label, zizmor and CI. Once the PR exists, let it merge +itself when those pass, unless the user asked to hold it: + +```bash +gh pr merge --auto --squash +``` + +Say so in your reply: "auto-merge is on; it squash-merges once the required checks pass". Don't merge it with `--admin` +to skip checks. + +### 10. Return the PR URL Always print the URL so the user can open it directly. diff --git a/.claude/skills/releasing/SKILL.md b/.claude/skills/releasing/SKILL.md index 3cbda33..6725eef 100644 --- a/.claude/skills/releasing/SKILL.md +++ b/.claude/skills/releasing/SKILL.md @@ -5,11 +5,11 @@ description: Release this repository. Use when the user asks to release, ship a # Release -Releases are never cut from a pushed tag. release-drafter keeps a **draft release** up to date from the labels of merged -pull requests; **publishing that draft** creates the tag and runs `.github/workflows/ci.yml` on it. There the `aot-pack` -matrix builds the native-AOT package for every RID, and the `build` job packs the rest at the tag's version (MinVer), -validates them, pushes the container image (`ghcr.io/nullean/release-notes`, tagged `latest` and the version), pushes -the packages to nuget.org with trusted publishing and appends the public API changes to the release notes. +Releases are never cut from a pushed tag. release-drafter keeps a **draft release** up to date from the labels of +merged pull requests; **publishing that draft** creates the tag and runs `.github/workflows/ci.yml` on it. Its release +jobs pack at the tag's version (MinVer), push to nuget.org with trusted publishing (always from a job of `ci.yml` +itself, which the nuget.org policy names) and, in repositories that ship binaries, attach them to the release. Which +jobs those are, and anything else this repository does on a release, is in the Releasing section of `AGENTS.md`. ## Steps @@ -33,7 +33,7 @@ the packages to nuget.org with trusted publishing and appends the public API cha The maintainer often promotes the draft from the GitHub UI instead; both do the same. -4. Follow the run and report the outcome, packages and container image included: +4. Follow the run and report the outcome, packages and assets included: ```bash gh run watch "$(gh run list --workflow ci.yml --event release --limit 1 --json databaseId --jq '.[0].databaseId')" @@ -42,8 +42,9 @@ the packages to nuget.org with trusted publishing and appends the public API cha ## When it fails -- Re-run the failed jobs (`gh run rerun --failed`). The push uses `--skip-duplicate`, the image tags are - overwritten and the API changes are appended once, so a re-run is safe. -- `trusted publishing` errors mean nuget.org's policy no longer names this repo's `ci.yml`. Only the maintainer can - fix that on nuget.org. +- Re-run the failed jobs (`gh run rerun --failed`). The push uses `--skip-duplicate` and asset uploads use + `--clobber`, so a re-run is safe. +- `Token exchange failed (HTTP 401)` at the NuGet login means the push ran outside a job of this repo's `ci.yml` (for + example inside a shared workflow), or nuget.org's policy no longer names `ci.yml`. The first is a workflow fix; only + the maintainer can fix the second, on nuget.org. - Never delete a published tag or release to retry. Fix forward with a patch release. diff --git a/.claude/skills/upgrade-deps/SKILL.md b/.claude/skills/upgrade-deps/SKILL.md index 3c870d3..84a014b 100644 --- a/.claude/skills/upgrade-deps/SKILL.md +++ b/.claude/skills/upgrade-deps/SKILL.md @@ -10,7 +10,7 @@ Versions live in one place each: | What | Where | |---|---| | NuGet packages | `Directory.Packages.props` (Central Package Management); never put `Version=` on a `PackageReference` | -| .NET tools | `dotnet-tools.json` (or `dotnet-tools.json` at the root) | +| .NET tools | `.config/dotnet-tools.json` (or `dotnet-tools.json` at the root) | | .NET SDK | `global.json` only; mise reads it from there | | other CLI tools | `mise.toml` `[tools]` | | GitHub Actions | pinned by commit SHA with a `# vX.Y.Z` comment; reusable workflows from `nullean/.github` likewise | @@ -25,7 +25,8 @@ Versions live in one place each: 5. Label the PR `dependencies` unless the bump forces consumers to change something; then it is `breaking` (see [breaking-changes](../breaking-changes/SKILL.md)). -For dependabot PRs: check CI, read the changelog for majors, merge groups that pass. Do not rebase a dependabot PR by +For dependabot PRs: patch and minor updates merge themselves once CI passes (`dependabot-automerge.yml`). Majors +wait for you: read the changelog, then `gh pr merge --auto --squash`. Do not rebase a dependabot PR by hand; comment `@dependabot rebase`. Pin an action to the commit its release tag points at: diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3240e54 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +# The shared .editorconfig sets end_of_line = lf, and IDE0055 is an error: without this, a Windows checkout gets CRLF +# and every C# line fails the build. Binary files a repository adds need their own `binary` line below. +* text=auto eol=lf +*.png binary +*.jpg binary +*.gif binary +*.ico binary +*.snk binary +*.nupkg binary +*.zip binary diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml new file mode 100644 index 0000000..17cef14 --- /dev/null +++ b/.github/workflows/dependabot-automerge.yml @@ -0,0 +1,13 @@ +name: dependabot-automerge + +on: + pull_request: + +permissions: {} + +jobs: + automerge: + uses: nullean/.github/.github/workflows/dependabot-automerge.yml@d850ce6eee9efa9f81b410d15fcd480409518d19 # v1.5.0 + permissions: + contents: write + pull-requests: write diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index cd16364..1551089 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -8,5 +8,5 @@ permissions: {} jobs: release-label: - uses: nullean/.github/.github/workflows/pr-labels.yml@83ef343759c443afe1964e9c33327527f8677b05 # v1.3.0 + uses: nullean/.github/.github/workflows/pr-labels.yml@d850ce6eee9efa9f81b410d15fcd480409518d19 # v1.5.0 permissions: {}