diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13d073d42..d47ed19fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: branches: - dev + - v2-dev permissions: contents: read @@ -44,12 +45,15 @@ jobs: - name: Check backward compatibility run: pnpm run check:compat --strict + # Both branches get their own "chore: update versions" PR. Only `dev` publishes: + # `v2-dev` carries a major changeset, and an empty publish-script keeps the action + # from shipping 2.0.0 to npm as `latest` once that PR is merged. - name: Create release Pull Request or publish to NPM id: changesets uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2 with: version-script: pnpm run version - publish-script: pnpm run publish + publish-script: ${{ github.ref_name == 'dev' && 'pnpm run publish' || '' }} commit-message: "chore: update versions" pr-title: "chore: update versions" # Push through git instead of the GitHub API: the API mode force-updates