Open technophile-04 opened 6 months ago
Found a way to fix this, in the action's "Create a release pull request" step you can add a custom script using version
BUT it fails for some reason if you add the format script right there, like if you do this
# release.yml
- name: "Create a release pull request"
uses: changesets/action@v1
with:
commit: "chore(release): version packages"
title: "chore(release): version packages"
version: pnpm changeset version && pnpm format
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
So instead create a separate script that does both and add it there
/* package.json */
"scripts": {
"format": "prettier --write \"**/*.{svelte,js,cjs,mjs,ts,cts,mts,json,md,yaml,yml}\"",
"changeset-add": "changeset add",
"changeset-status": "changeset status --verbose",
"changeset-version": "changeset version && pnpm format"
},
# release.yml
- name: "Create a release pull request"
uses: changesets/action@v1
with:
commit: "chore(release): version packages"
title: "chore(release): version packages"
version: pnpm changeset-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Description :
When the "Version Packages" PR is created it updates the package.json version but also formats other fields in the wrong way.
It's not respecting my biome.json config and instead I think its using prettier to format the file