@danhezcode/test-auto-release 1.1.0 โ 1.2.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/.github/workflows/release.yml +4 -5
- package/changelog-preset.js +15 -16
- package/package.json +2 -1
- package/release.config.mjs +21 -19
- package/.github/workflows/validations.yml +0 -63
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
name: Release
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
branches: [main]
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: ["**"]
|
|
6
|
+
push:
|
|
7
|
+
branches: [main, develop]
|
|
8
8
|
workflow_dispatch:
|
|
9
9
|
|
|
10
10
|
permissions:
|
|
@@ -17,7 +17,6 @@ permissions:
|
|
|
17
17
|
jobs:
|
|
18
18
|
release:
|
|
19
19
|
name: Semantic Release
|
|
20
|
-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
21
20
|
runs-on: ubuntu-latest
|
|
22
21
|
timeout-minutes: 10
|
|
23
22
|
concurrency: release
|
package/changelog-preset.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import createPreset from "conventional-changelog-conventionalcommits";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
3
|
+
const conventionalcommitsPreset = createPreset({
|
|
4
|
+
types: [
|
|
5
|
+
{ type: "feat", section: "๐ New Features", hidden: false },
|
|
6
|
+
{ type: "fix", section: "๐ Bug Fixes", hidden: false },
|
|
7
|
+
{ type: "docs", section: "๐ Documentation Improvements", hidden: false },
|
|
8
|
+
{ type: "style", section: "๐จ Code Style & Formatting", hidden: false },
|
|
9
|
+
{ type: "refactor", section: "๐ง Code Refactoring", hidden: false },
|
|
10
|
+
{ type: "perf", section: "โก Performance Improvements", hidden: false },
|
|
11
|
+
{ type: "test", section: "๐งช Test Updates", hidden: false },
|
|
12
|
+
{ type: "chore", section: "๐ฆ Internal Maintenance", hidden: false },
|
|
13
|
+
],
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export default conventionalcommitsPreset;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danhezcode/test-auto-release",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"description": "A starter for creating a TypeScript package.",
|
|
6
6
|
"author": "danhezcode@gmail.com",
|
|
7
7
|
"license": "MIT",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"@semantic-release/npm": "13.1.4",
|
|
45
45
|
"@types/bun": "latest",
|
|
46
46
|
"@types/node": "25.0.6",
|
|
47
|
+
"conventional-changelog-conventionalcommits": "^9.3.1",
|
|
47
48
|
"eslint": "9.39.2",
|
|
48
49
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
49
50
|
"eslint-plugin-import": "2.32.0",
|
package/release.config.mjs
CHANGED
|
@@ -4,19 +4,11 @@ export default {
|
|
|
4
4
|
|
|
5
5
|
plugins: [
|
|
6
6
|
"@semantic-release/commit-analyzer",
|
|
7
|
-
|
|
8
7
|
[
|
|
9
8
|
"@semantic-release/release-notes-generator",
|
|
10
9
|
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
],
|
|
14
|
-
|
|
15
|
-
[
|
|
16
|
-
"@semantic-release/changelog",
|
|
17
|
-
{
|
|
18
|
-
changelogFile: "CHANGELOG.md",
|
|
19
|
-
writerOpts: {
|
|
10
|
+
preset: "conventionalcommits",
|
|
11
|
+
presetConfig: {
|
|
20
12
|
types: [
|
|
21
13
|
{ type: "feat", section: "๐ New Features", hidden: false },
|
|
22
14
|
{ type: "fix", section: "๐ Bug Fixes", hidden: false },
|
|
@@ -28,18 +20,28 @@ export default {
|
|
|
28
20
|
{ type: "chore", section: "๐ฆ Internal Maintenance", hidden: false },
|
|
29
21
|
],
|
|
30
22
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
// writerOpts: {
|
|
24
|
+
// groupBy: "type",
|
|
25
|
+
// commitGroupsSort: (commitGroupA, commitGroupB) => {
|
|
26
|
+
// const commitGroupTitleA = commitGroupA.title.replace(/[^a-zA-Z]/gu, "").toLowerCase();
|
|
27
|
+
// const commitGroupTitleB = commitGroupB.title.replace(/[^a-zA-Z]/gu, "").toLowerCase();
|
|
35
28
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
// if (commitGroupsOrder[commitGroupTitleA] === undefined || commitGroupsOrder[commitGroupTitleB] === undefined) {
|
|
30
|
+
// return 0;
|
|
31
|
+
// }
|
|
32
|
+
// if (commitGroupsOrder[commitGroupTitleA] < commitGroupsOrder[commitGroupTitleB]) {
|
|
33
|
+
// return -1;
|
|
34
|
+
// }
|
|
35
|
+
// if (commitGroupsOrder[commitGroupTitleA] > commitGroupsOrder[commitGroupTitleB]) {
|
|
36
|
+
// return 1;
|
|
37
|
+
// }
|
|
38
|
+
// return 0;
|
|
39
|
+
// },
|
|
40
|
+
// },
|
|
40
41
|
},
|
|
41
42
|
],
|
|
42
|
-
|
|
43
|
+
["@semantic-release/npm", { npmPublish: true }],
|
|
44
|
+
["@semantic-release/git"],
|
|
43
45
|
[
|
|
44
46
|
"@semantic-release/github",
|
|
45
47
|
{
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
name: Validations
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches: ["**"]
|
|
6
|
-
|
|
7
|
-
push:
|
|
8
|
-
branches: [main, develop]
|
|
9
|
-
|
|
10
|
-
workflow_dispatch:
|
|
11
|
-
|
|
12
|
-
permissions:
|
|
13
|
-
checks: write
|
|
14
|
-
statuses: write
|
|
15
|
-
contents: read
|
|
16
|
-
pull-requests: read
|
|
17
|
-
|
|
18
|
-
jobs:
|
|
19
|
-
validate:
|
|
20
|
-
name: Validate Code Quality
|
|
21
|
-
runs-on: ubuntu-latest
|
|
22
|
-
timeout-minutes: 15
|
|
23
|
-
|
|
24
|
-
steps:
|
|
25
|
-
- name: Checkout repo
|
|
26
|
-
uses: actions/checkout@v4
|
|
27
|
-
with:
|
|
28
|
-
fetch-depth: 0 # Necesario para commitlint
|
|
29
|
-
|
|
30
|
-
- name: Setup Node.js
|
|
31
|
-
uses: actions/setup-node@v4
|
|
32
|
-
with:
|
|
33
|
-
node-version: 24
|
|
34
|
-
|
|
35
|
-
- name: Setup pnpm
|
|
36
|
-
uses: pnpm/action-setup@v4
|
|
37
|
-
with:
|
|
38
|
-
version: 10
|
|
39
|
-
|
|
40
|
-
- name: Install dependencies
|
|
41
|
-
run: pnpm install --frozen-lockfile
|
|
42
|
-
|
|
43
|
-
- name: Lint
|
|
44
|
-
run: pnpm lint:fix
|
|
45
|
-
|
|
46
|
-
- name: Format check
|
|
47
|
-
run: pnpm format:prettier
|
|
48
|
-
|
|
49
|
-
- name: TypeScript check
|
|
50
|
-
run: pnpm typecheck
|
|
51
|
-
|
|
52
|
-
- name: Run tests
|
|
53
|
-
run: pnpm test
|
|
54
|
-
|
|
55
|
-
# - name: Build check
|
|
56
|
-
# run: pnpm build
|
|
57
|
-
|
|
58
|
-
# - name: Audit dependencies
|
|
59
|
-
# run: pnpm audit --prod --audit-level=moderate && pnpm audit signatures
|
|
60
|
-
|
|
61
|
-
- name: Commitlint
|
|
62
|
-
if: github.event_name == 'pull_request'
|
|
63
|
-
run: pnpm commitlint --from=${{ github.event.pull_request.base.sha }} --to=HEAD
|