Skip to content

Commit 0b2d243

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

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
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 --github-release",
14+
"release:publish:dry-run": "code-infra publish --github-release --dry-run",
1315
"release:version": "lerna version --no-changelog --no-push --no-git-tag-version --no-private --force-publish=@mui/core-downloads-tracker",
1416
"release:build": "lerna run --concurrency 8 --no-private build --skip-nx-cache",
1517
"release:changelog": "node scripts/releaseChangelog.mjs",

scripts/README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,18 @@ The following steps must be proposed as a pull request to `release/<PATCH_VERSIO
9696
7. Merge PR into `release/<PATCH_VERSION>` once CI is green and it has been approved.
9797
8. Open and merge a PR from `release/<PATCH_VERSION>` to master to correct the package versioning and update the changelog.
9898

99-
#### Release
99+
### Release the packages
100100

101-
1. Go to the [publish action](https://github.com/mui/material-ui/actions/workflows/publish.yml).
102-
2. Choose "Run workflow" dropdown
101+
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.
102+
2. It'll automatically fetch the latest merged release PR and ask for confirmation before publishing.
103+
3. If you already know the sha of the commit, you can pass it directly like `pnpm release:publish --sha <your-sha>`.
104+
4. Other flags for the command:
103105

104-
> - **Branch:** `release/<PATCH_VERSION>`
105-
> - **Commit SHA to release from:** the commit that contains the merged release on `release/<PATCH_VERSION>`. This commit is linked to the GitHub release.
106-
> - **Run in dry-run mode:** Used for debugging.
107-
> - **Create GitHub release:** Keep selected if you want a GitHub release to be automatically created from the changelog.
108-
> - **npm dist tag to publish to** Use to publish legacy or canary versions.
106+
> - **--dry-run** Used for debugging. Or directly run `pnpm release:publish:dry-run`.
107+
> - **--dist-tag** Use to publish legacy or canary versions.
109108
110-
3. Click "Run workflow"
111-
4. Refresh the page to see the newly created workflow, and click it.
112-
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.**
109+
5. This command invokes the [Publish](https://github.com/mui/base-ui/actions/workflows/publish.yml) GitHub action. It'll log the url which can be opened to see the latest workflow run.
110+
6. 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.**
113111

114112
#### Documentation
115113

0 commit comments

Comments
 (0)