Skip to content

Commit

Permalink
fix: publish nightly release for all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
smrz2001 committed Jan 30, 2024
1 parent fed99a6 commit 9a55e90
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/reusable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,15 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
npm config set //registry.npmjs.org/:_authToken $NODE_AUTH_TOKEN
# This step can fail if nothing changed that warranted a new release. This is a nightly release and best
# effort, so this is ok.
npm run publish:nightly -- --yes || true
# First try to publish all the packages. Once a release or RC is made, all the package versions get bumped
# and we want to publish nightly packages for the new versions. If this fails, presumably because some
# packages have not changed since the last release, we'll try to publish only the packages that did change.
npm run publish:nightly -- --force-publish --yes
if [ $? -eq 0 ]; then
exit 0
else
# Now reset the branch and try to publish only the packages that have changed since the last release
git reset --hard HEAD^
npm run publish:nightly -- --yes || true
fi
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"publish:release-candidate-followup": "npx lerna publish --dist-tag next --preid rc --no-verify-access --conventional-prerelease",
"publish:release": "npx lerna publish --dist-tag latest --create-release github --no-verify-access --conventional-graduate bump minor",
"publish:hotfix": "npx lerna publish --dist-tag latest --no-verify-access --conventional-graduate bump patch",
"publish:nightly": "npx lerna publish --dist-tag nightly --no-verify-access --no-push --canary --preid nightly",
"publish:nightly": "npx lerna publish --dist-tag nightly --no-verify-access --no-push --canary prerelease --preid nightly",
"format": "npx prettier --write 'packages/**/src/**/*{.ts,.tsx,.js}'",
"lint": "npx lerna run lint && npx prettier --check packages/**/src/**/*.ts",
"clean": "npm run clean:deps && npm run clean:coverage && npm run clean:build-artifacts",
Expand Down

0 comments on commit 9a55e90

Please sign in to comment.