Trigger.dev uses changesets to manage updated our packages and releasing them to npm.
To add a changeset, use pnpm run changeset:add and follow the instructions here. Please only ever select one of our public packages when adding a changeset.
Based on the instructions here
- Run
pnpm run changeset:version - Run
pnpm run changeset:release
Please follow the best-practice of adding changesets in the same commit as the code making the change with pnpm run changeset:add, as it will allow our release.yml CI workflow to function properly:
- Anytime new changesets are added in a commit in the
mainbranch, the release.yml workflow will run and will automatically create/update a PR with a fresh run ofpnpm run changeset:version. - When the version PR is merged into
main, the release.yml workflow will automatically runpnpm run changeset:releaseto build and release packages to npm.
- Add changesets as usual
pnpm run changeset:add - Switch to pre-release mode by running
pnpm run changeset:next - Create version
pnpm run changeset:version - Release
pnpm run changeset:release - Switch back to normal mode by running
pnpm run changeset:normal
-
Delete the
.changeset/pre.jsonfile (if it exists) -
Do a temporary commit (do NOT push this, you should undo it after)
-
Copy the
GITHUB_TOKENline from the .env file -
Run
GITHUB_TOKEN=github_pat_12345 ./scripts/publish-prerelease.sh re2
Make sure to replace the token with yours. re2 is the tag that will be used for the pre-release.
- Undo the commit where you deleted the pre.json file.