From d9dc6b35ec5126ff4ac11130997c4390135f01bb Mon Sep 17 00:00:00 2001 From: hardfist Date: Mon, 29 May 2023 14:01:30 +0800 Subject: [PATCH] chore: custom release (#3303) * chore: custom release * chore: fix root --- .changeset/README.md | 8 -------- .changeset/twelve-dots-repair.md | 5 ----- .github/workflows/release-pull-request.yml | 18 ++++++++---------- scripts/release/version.mjs | 4 ++-- webpack-test/package.json | 6 +++--- 5 files changed, 13 insertions(+), 28 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..65f3bb11ae1 100644 --- a/.github/workflows/release-pull-request.yml +++ b/.github/workflows/release-pull-request.yml @@ -5,14 +5,14 @@ on: inputs: version: type: choice - description: "Release Type(next, beta, alpha, latest)" + description: "Release Version(major|minor|patch|snapshot)" 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..e699056e342 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); @@ -45,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