Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: publish nightly release for all packages #3125

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/reusable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,25 @@ jobs:
name: Initialize and build code
run: npm ci && npm run build
-
# This step explicitly does not push the release commit so the specified nightly branch will not be impacted.
name: Publish packages to NPM
# These step explicitly do not push the release commit so the specified nightly branch will not be impacted
name: Publish all packages to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
npm config set //registry.npmjs.org/:_authToken $NODE_AUTH_TOKEN
# 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
continue-on-error: true
-
# Now reset the branch and try to publish only the packages that have changed since the last release
name: Publish updated packages to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
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.
git reset --hard HEAD^
npm run publish:nightly -- --yes || true
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
Loading