Skip to content

Commit

Permalink
chore: custom release (#3303)
Browse files Browse the repository at this point in the history
* chore: custom release

* chore: fix root
  • Loading branch information
hardfist authored May 29, 2023
1 parent c1b0fe5 commit d9dc6b3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 28 deletions.
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/twelve-dots-repair.md

This file was deleted.

18 changes: 8 additions & 10 deletions .github/workflows/release-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions scripts/release/version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions webpack-test/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -119,4 +119,4 @@
"json"
]
}
}
}

0 comments on commit d9dc6b3

Please sign in to comment.