name: Release on: push: branches: - main workflow_dispatch: concurrency: ${{ github.workflow }}-${{ github.ref }} permissions: contents: write pull-requests: write id-token: write jobs: release: name: Release runs-on: ubuntu-latest timeout-minutes: 10 steps: - name: Checkout Repo uses: actions/checkout@v7 - name: Setup pnpm uses: pnpm/action-setup@v4 - uses: actions/setup-node@v7 with: node-version: "24" # Do not set registry-url: it writes # //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} into the runner # npmrc. Under OIDC trusted publishing there is no NODE_AUTH_TOKEN, so # that line poisons anonymous `npm info` reads that changesets uses to # decide what is already on the registry (empty stdout → treated as # unpublished → republish of already-released versions). # Pin npm 11.x: trusted publishing needs >=11.5.1, but npm 12 changed # `npm info --json` to return an array. @changesets/cli <2.31 reads # `.versions` off the top-level object, sees none, and tries to republish # every package on every main push. - name: Update npm run: npm install -g npm@11 - name: Install Dependencies run: pnpm i - name: Build Packages run: pnpm build:packages - name: Build Website run: pnpm build --filter website - name: Run Tests run: pnpm test - name: Check Linting and Formatting run: pnpm check - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 with: version: pnpm changeset version publish: pnpm changeset publish # github-api creates verified commits (required by repo rules); # git-cli commits are unsigned and get rejected on push. commitMode: github-api env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: "" # Workaround for https://github.com/changesets/action/pull/545