@peiyanlu/release 1.3.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -356
- package/dist/action.mjs +1036 -0
- package/dist/cli.mjs +878 -1412
- package/dist/index.d.mts +850 -253
- package/dist/index.mjs +2848 -149
- package/package.json +27 -12
- package/template/release.config.hbs +29 -0
- package/template/release.text +82 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peiyanlu/release",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Tool to automate version bumps, changelogs, and releases.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"private": false,
|
|
@@ -10,10 +10,8 @@
|
|
|
10
10
|
},
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
"default": "./dist/index.mjs"
|
|
16
|
-
}
|
|
13
|
+
"types": "./dist/index.d.mts",
|
|
14
|
+
"default": "./dist/index.mjs"
|
|
17
15
|
},
|
|
18
16
|
"./package.json": "./package.json"
|
|
19
17
|
},
|
|
@@ -31,13 +29,21 @@
|
|
|
31
29
|
"conventional-changelog": "^8.1.0",
|
|
32
30
|
"conventional-changelog-conventionalcommits": "^10.2.1",
|
|
33
31
|
"conventional-recommended-bump": "^12.1.0",
|
|
34
|
-
"mime-types": "^3.0.2",
|
|
35
|
-
"minimatch": "^10.2.5",
|
|
36
32
|
"open": "^11.0.0",
|
|
37
33
|
"publint": "^0.3.22",
|
|
38
34
|
"semver": "^7.8.5",
|
|
39
35
|
"tinyglobby": "^0.2.17",
|
|
40
|
-
"yaml": "^2.9.0"
|
|
36
|
+
"yaml": "^2.9.0",
|
|
37
|
+
"handlebars": "^4.7.9"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@peiyanlu/test-tools": "^0.0.7",
|
|
41
|
+
"@types/node": "^24.13.3",
|
|
42
|
+
"@types/semver": "^7.7.1",
|
|
43
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
44
|
+
"tsdown": "^0.23.1",
|
|
45
|
+
"typescript": "^6.0.3",
|
|
46
|
+
"vitest": "^4.1.10"
|
|
41
47
|
},
|
|
42
48
|
"author": {
|
|
43
49
|
"name": "YanluPei",
|
|
@@ -51,7 +57,8 @@
|
|
|
51
57
|
"cli"
|
|
52
58
|
],
|
|
53
59
|
"files": [
|
|
54
|
-
"dist"
|
|
60
|
+
"dist",
|
|
61
|
+
"template"
|
|
55
62
|
],
|
|
56
63
|
"publishConfig": {
|
|
57
64
|
"access": "public",
|
|
@@ -64,5 +71,13 @@
|
|
|
64
71
|
"bugs": {
|
|
65
72
|
"url": "https://github.com/peiyanlu/release/issues"
|
|
66
73
|
},
|
|
67
|
-
"homepage": "https://github.com/peiyanlu/release#readme"
|
|
68
|
-
|
|
74
|
+
"homepage": "https://github.com/peiyanlu/release#readme",
|
|
75
|
+
"scripts": {
|
|
76
|
+
"dev": "tsdown -w",
|
|
77
|
+
"build": "tsdown",
|
|
78
|
+
"release": "node index.js",
|
|
79
|
+
"release:dry": "node index.js -C -n",
|
|
80
|
+
"test": "vitest run",
|
|
81
|
+
"test:cov": "vitest run --coverage"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{{#if npmOrPnpm}}
|
|
2
|
+
{{#if npm}}
|
|
3
|
+
import { defineConfig, GithubHosting, {{#if monorepo}}NpmWorkspacesProject{{else}}NpmProject{{/if}} } from '@peiyanlu/release'
|
|
4
|
+
{{else}}
|
|
5
|
+
import { defineConfig, GithubHosting, {{#if monorepo}}PnpmWorkspacesProject{{else}}PnpmProject{{/if}} } from '@peiyanlu/release'
|
|
6
|
+
{{/if}}
|
|
7
|
+
{{else}}
|
|
8
|
+
import { defineConfig } from '@peiyanlu/release'
|
|
9
|
+
{{/if}}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
export default defineConfig({
|
|
13
|
+
{{#if npmOrPnpm}}
|
|
14
|
+
{{#if monorepo}}
|
|
15
|
+
project: new {{#if npm}}NpmWorkspacesProject{{else}}PnpmWorkspacesProject{{/if}}({
|
|
16
|
+
mode: {{#if fixed}}'fixed'{{else}}'independent'{{/if}},
|
|
17
|
+
}),
|
|
18
|
+
bump: {
|
|
19
|
+
extraScopes: [ 'deps' ],
|
|
20
|
+
},
|
|
21
|
+
{{else}}
|
|
22
|
+
project: new {{#if npm}}NpmProject{{else}}PnpmProject{{/if}}(),
|
|
23
|
+
{{/if}}
|
|
24
|
+
hosting: new GithubHosting(),
|
|
25
|
+
{{/if}}
|
|
26
|
+
releaser: {
|
|
27
|
+
verbose: true,
|
|
28
|
+
},
|
|
29
|
+
})
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: Release Project
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issue_comment:
|
|
5
|
+
types: [ created, deleted ]
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- master
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
check:
|
|
12
|
+
name: Context check
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
outputs:
|
|
17
|
+
continue: ${{ steps.check.outputs.continue }}
|
|
18
|
+
workflow: ${{ steps.check.outputs.workflow }}
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout
|
|
21
|
+
uses: actions/checkout@v7
|
|
22
|
+
|
|
23
|
+
- name: Context check
|
|
24
|
+
id: check
|
|
25
|
+
uses: peiyanlu/release@v2
|
|
26
|
+
with:
|
|
27
|
+
workflow: check
|
|
28
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
29
|
+
|
|
30
|
+
pull-request:
|
|
31
|
+
name: Pull request
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
needs: check
|
|
34
|
+
if: needs.check.outputs.workflow == 'pull-request'
|
|
35
|
+
permissions:
|
|
36
|
+
contents: write
|
|
37
|
+
pull-requests: write
|
|
38
|
+
steps:
|
|
39
|
+
- name: Checkout
|
|
40
|
+
uses: actions/checkout@v7
|
|
41
|
+
|
|
42
|
+
- name: Create or update pull request
|
|
43
|
+
uses: peiyanlu/release@v2
|
|
44
|
+
with:
|
|
45
|
+
workflow: pull-request
|
|
46
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
47
|
+
|
|
48
|
+
release:
|
|
49
|
+
name: Release
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
needs: check
|
|
52
|
+
if: needs.check.outputs.workflow == 'release'
|
|
53
|
+
permissions:
|
|
54
|
+
contents: write
|
|
55
|
+
steps:
|
|
56
|
+
- name: Checkout
|
|
57
|
+
uses: actions/checkout@v7
|
|
58
|
+
with:
|
|
59
|
+
fetch-depth: 0
|
|
60
|
+
fetch-tags: true
|
|
61
|
+
|
|
62
|
+
- name: Setup pnpm
|
|
63
|
+
uses: pnpm/action-setup@v6
|
|
64
|
+
with:
|
|
65
|
+
version: 12
|
|
66
|
+
|
|
67
|
+
- name: Setup Node.js
|
|
68
|
+
uses: actions/setup-node@v7
|
|
69
|
+
with:
|
|
70
|
+
node-version: 24
|
|
71
|
+
registry-url: https://registry.npmjs.org/
|
|
72
|
+
package-manager-cache: false
|
|
73
|
+
|
|
74
|
+
- name: Install dependencies
|
|
75
|
+
run: pnpm install --frozen-lockfile
|
|
76
|
+
|
|
77
|
+
- name: Release
|
|
78
|
+
uses: peiyanlu/release@v2
|
|
79
|
+
with:
|
|
80
|
+
workflow: release
|
|
81
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
82
|
+
npm-token: ${{ secrets.NPM_TOKEN }}
|