From 9653cc964a2fd0d36997aa5bd81dda9d3e5d4b9e Mon Sep 17 00:00:00 2001 From: "Raphael S." <52125687+raphaelsalaja@users.noreply.github.com> Date: Sun, 26 Apr 2026 20:03:06 +0100 Subject: [PATCH] ci: add changesets release workflow Runs on pushes to main. When unreleased changesets are present, opens or updates a "Version Packages" PR that bumps versions and consumes the changesets. When that PR merges, the workflow publishes the updated packages to npm with provenance. Made-with: Cursor --- .github/workflows/release.yml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..af68ff03 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Release + +on: + push: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +jobs: + release: + name: Version or publish + 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: 20 + cache: pnpm + registry-url: https://registry.npmjs.org + + - run: pnpm install --frozen-lockfile + + - run: pnpm build + + - name: Create Release PR or publish + uses: changesets/action@v1 + with: + version: pnpm changeset version + publish: pnpm changeset publish + commit: "chore(release): version packages" + title: "chore(release): version packages" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_CONFIG_PROVENANCE: "true"