From eba02d1974854f6552180dacba56696803a5a00f Mon Sep 17 00:00:00 2001 From: Mikhail Kotelnikov Date: Mon, 5 Oct 2026 09:33:01 +0200 Subject: [PATCH 1/2] ci: shared release job and Renovate - ci.yml: the release job of statewalker/.github runs after CI on pushes to main (version pull request, then npm publishing with provenance); the repository's own release workflow, if any, is removed. - renovate.json: the shared Renovate preset. - .changeset: config for changesets 3 (private packages not versioned); @changesets/cli in the catalog; old publish/version scripts removed. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DAiZN6XrTAdQpNN3eXEz2U --- .changeset/README.md | 9 +++++++++ .changeset/config.json | 6 +++++- .github/workflows/ci.yml | 32 ++++++++++++----------------- .github/workflows/release.yml | 38 ----------------------------------- package.json | 5 +---- renovate.json | 4 ++++ 6 files changed, 32 insertions(+), 62 deletions(-) create mode 100644 .changeset/README.md delete mode 100644 .github/workflows/release.yml create mode 100644 renovate.json diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 0000000..0b3aa5a --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,9 @@ +# Changesets + +A changeset records a package release: which packages, which bump, and the changelog text. + +- `pnpm changeset` writes one; commit it with the change it describes. +- Without one, the release job writes a patch changeset for every package whose published contents + changed (a minor, on 0.x, when a dependency moved to another breaking line). +- On `main`, pending changesets become the "chore: version packages" pull request; merging it + publishes the packages to npm. diff --git a/.changeset/config.json b/.changeset/config.json index b821332..426cd84 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,5 +1,5 @@ { - "$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json", + "$schema": "https://unpkg.com/@changesets/config@4.0.1/schema.json", "changelog": "@changesets/cli/changelog", "commit": false, "fixed": [], @@ -7,5 +7,9 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", + "privatePackages": { + "version": false, + "tag": false + }, "ignore": [] } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ece6d3c..924c68f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,25 +4,19 @@ on: push: branches: [main] pull_request: - branches: [main] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true jobs: ci: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: "24" - cache: pnpm - - run: pnpm install --frozen-lockfile - - run: pnpm run lint:check - - run: pnpm run format:check - - run: pnpm run build - - run: pnpm run typecheck - - run: pnpm run test + uses: statewalker/.github/.github/workflows/ci.yml@main + + # Releases to npm: a version pull request while changes are unreleased, publishing once it is + # merged. npm's trusted publishers for these packages name this file (ci.yml). + release: + needs: ci + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: statewalker/.github/.github/workflows/release.yml@main + permissions: + contents: write + pull-requests: write + id-token: write + secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index b7a8a3d..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Release - -on: - push: - branches: [main] - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -jobs: - release: - if: github.repository == 'statewalker/statewalker-shared' - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - id-token: write - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: "24" - cache: pnpm - registry-url: "https://registry.npmjs.org" - - run: pnpm install --frozen-lockfile - - run: pnpm run build - - name: Create release PR or publish - uses: changesets/action@v1 - with: - publish: pnpm run release-packages - version: pnpm run version-packages - commit: "chore: version packages" - title: "chore: version packages" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 00b4a73..ef6571a 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,7 @@ "lint:check": "biome check .", "format": "biome format --write .", "format:check": "biome format .", - "publish-all": "pnpm run build && pnpm -r publish --access public --no-git-checks", - "changeset": "changeset", - "version-packages": "changeset version", - "release-packages": "changeset publish" + "changeset": "changeset" }, "devDependencies": { "@biomejs/biome": "catalog:", diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..247bee9 --- /dev/null +++ b/renovate.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["github>statewalker/.github"] +} From 6e942a10d604f3f9c3222eb2ac59941243bd6905 Mon Sep 17 00:00:00 2001 From: Mikhail Kotelnikov Date: Mon, 5 Oct 2026 10:34:44 +0200 Subject: [PATCH 2/2] ci: run CI again now that statewalker/.github has release.yml Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DAiZN6XrTAdQpNN3eXEz2U