Skip to content

Commit a4f01dd

Browse files
committed
[code-infra] Fix breaking change for ci publish
also added local release:publish command
1 parent 314a02d commit a4f01dd

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ jobs:
5757
ARGS="$ARGS --tag ${{ inputs.dist-tag }}"
5858
fi
5959
60-
pnpm code-infra publish $ARGS
60+
pnpm code-infra publish --ci $ARGS

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"build:ci": "lerna run build --concurrency 8 --skip-nx-cache",
1111
"build:public": "lerna run --no-private build",
1212
"build:public:ci": "lerna run --no-private build --concurrency 8 --skip-nx-cache",
13+
"release:publish": "code-infra publish",
1314
"release:version": "lerna version --no-changelog --no-push --no-git-tag-version --no-private --force-publish=@mui/core-downloads-tracker",
1415
"release:build": "lerna run --concurrency 8 --no-private build --skip-nx-cache",
1516
"release:changelog": "node scripts/releaseChangelog.mjs",

scripts/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ The following steps must be proposed as a pull request to `release/<PATCH_VERSIO
9898

9999
#### Release
100100

101+
From Github UI:
102+
101103
1. Go to the [publish action](https://github.com/mui/material-ui/actions/workflows/publish.yml).
102104
2. Choose "Run workflow" dropdown
103105

@@ -111,6 +113,20 @@ The following steps must be proposed as a pull request to `release/<PATCH_VERSIO
111113
4. Refresh the page to see the newly created workflow, and click it.
112114
5. The next screen shows "@username requested your review to deploy to npm-publish", click "Review deployments" and authorize your workflow run. **Never approve workflow runs you didn't initiaite.**
113115

116+
From terminal:
117+
118+
1. Run `pnpm release:publish`. You may be asked to authenticate with Github when running the command for the first time or after a very long time.
119+
2. It'll automatically fetch the latest merged release PR and ask for confirmation before publishing.
120+
3. If you already know the sha of the commit, you can directly do `pnpm release:publish --sha your-sha`.
121+
4. Other flags for the command:
122+
123+
> - **--dry-run** Used for debugging.
124+
> - **--github-release** Pass if you want a GitHub release to be automatically created from the changelog.
125+
> - **--dist-tag** Use to publish legacy or canary versions.
126+
127+
5. This command invokes the same Github action as above behind the scene. It'll log the url which can be opened to see the latest workflow run.
128+
6. Open the latest workflow run and proceed with the approval.
129+
114130
#### Documentation
115131

116132
Run `git push -f material-ui-docs HEAD:latest` to deploy the documentation (it lives at https://material-ui.netlify.app/) with the latest changes.

0 commit comments

Comments
 (0)