From d878da4e5b9add979b907422b4b6c3c54413ff19 Mon Sep 17 00:00:00 2001 From: "yangjian.fe" Date: Thu, 25 May 2023 22:46:30 +0800 Subject: [PATCH 1/2] chore: custom release --- .changeset/README.md | 8 -------- .changeset/twelve-dots-repair.md | 5 ----- .github/workflows/release-pull-request.yml | 16 +++++++--------- scripts/release/version.mjs | 1 - 4 files changed, 7 insertions(+), 23 deletions(-) delete mode 100644 .changeset/README.md delete mode 100644 .changeset/twelve-dots-repair.md diff --git a/.changeset/README.md b/.changeset/README.md deleted file mode 100644 index e5b6d8d6a67..00000000000 --- a/.changeset/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Changesets - -Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works -with multi-package repos, or single-package repos to help you version and publish your code. You can -find the full documentation for it [in our repository](https://github.com/changesets/changesets) - -We have a quick list of common questions to get you started engaging with this project in -[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/twelve-dots-repair.md b/.changeset/twelve-dots-repair.md deleted file mode 100644 index d7e60cd9b4a..00000000000 --- a/.changeset/twelve-dots-repair.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rspack/cli": patch ---- - -Use devServer proxy configs for the preview command diff --git a/.github/workflows/release-pull-request.yml b/.github/workflows/release-pull-request.yml index 24f667c54ff..6ef4a9e63d1 100644 --- a/.github/workflows/release-pull-request.yml +++ b/.github/workflows/release-pull-request.yml @@ -9,10 +9,10 @@ on: required: true default: "latest" options: - - canary - - alpha - - beta - - latest + - major + - minor + - patch + - snapshot schedule: # 08:00 AM Beijing Time on every Tuesday - cron: "0 0 * * 2" @@ -32,12 +32,10 @@ jobs: uses: ./.github/actions/pnpm-cache - name: Create Release Pull Request - uses: web-infra-dev/actions@v2 + uses: hardfist/rspack-action@rspack with: - version: ${{ inputs.version || 'latest' }} - versionNumber: "auto" - type: "pull request" - tools: "changeset" + version: node ./x version ${{inputs.version || 'canary'}} + createGithubReleases: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/scripts/release/version.mjs b/scripts/release/version.mjs index efc92fd4240..9bb5657da23 100644 --- a/scripts/release/version.mjs +++ b/scripts/release/version.mjs @@ -30,7 +30,6 @@ export async function version_handler(version) { `version must be one of ${allowedVersion}, but you passed ${version}` ); } - await import("../check_changeset.js"); const root = process.cwd(); const lastVersion = await getLastVersion(root); From dfdd8fff6893d9dc5d3662268f799ac0364da142 Mon Sep 17 00:00:00 2001 From: "yangjian.fe" Date: Mon, 29 May 2023 11:57:51 +0800 Subject: [PATCH 2/2] chore: fix root --- .github/workflows/release-pull-request.yml | 2 +- scripts/release/version.mjs | 3 ++- webpack-test/package.json | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-pull-request.yml b/.github/workflows/release-pull-request.yml index 6ef4a9e63d1..65f3bb11ae1 100644 --- a/.github/workflows/release-pull-request.yml +++ b/.github/workflows/release-pull-request.yml @@ -5,7 +5,7 @@ on: inputs: version: type: choice - description: "Release Type(next, beta, alpha, latest)" + description: "Release Version(major|minor|patch|snapshot)" required: true default: "latest" options: diff --git a/scripts/release/version.mjs b/scripts/release/version.mjs index 9bb5657da23..e699056e342 100644 --- a/scripts/release/version.mjs +++ b/scripts/release/version.mjs @@ -44,7 +44,8 @@ export async function version_handler(version) { // skip all example upgrade if ( workspace.manifest.name?.includes("example-") || - workspace.manifest.private === true + (workspace.manifest.private === true && + workspace.manifest.name !== "monorepo") ) { continue; } diff --git a/webpack-test/package.json b/webpack-test/package.json index 7df22b05ff5..1e6606d99ab 100644 --- a/webpack-test/package.json +++ b/webpack-test/package.json @@ -1,7 +1,7 @@ { "name": "webpack-test", - "private": "true", - "version": "0.0.7", + "private": true, + "version": "0.1.12", "license": "MIT", "main": "./dist/index.d.ts", "scripts": { @@ -119,4 +119,4 @@ "json" ] } -} +} \ No newline at end of file