|
1 | 1 | /** |
2 | 2 | * @type {import('semantic-release').GlobalConfig} |
3 | 3 | */ |
4 | | -export default { |
5 | | - branches: ["main"], |
6 | | - tagFormat: "${version}", |
7 | | - plugins: [ |
8 | | - [ |
9 | | - "@semantic-release/commit-analyzer", |
10 | | - { |
11 | | - "preset": "conventionalcommits", |
12 | | - "releaseRules": [ |
13 | | - { "type": "docs", "release": "patch" } |
14 | | - ] |
15 | | - } |
16 | | - ], |
17 | | - "@semantic-release/release-notes-generator", |
18 | | - [ |
19 | | - "semantic-release-mirror-version", |
20 | | - { |
21 | | - "fileGlob": "@(package.yaml|megaparsec-time.cabal)", |
22 | | - "placeholderRegExp": "0.0.0-dev" |
23 | | - } |
24 | | - ], |
25 | | - [ |
26 | | - "@semantic-release/changelog", |
27 | | - { |
28 | | - changelogFile: "CHANGELOG.md", |
29 | | - changelogTitle: "Changelog" |
30 | | - } |
31 | | - ], |
32 | | - [ |
33 | | - "@semantic-release/git", |
34 | | - { |
35 | | - assets: [ |
36 | | - "CHANGELOG.md", |
37 | | - ] |
38 | | - } |
39 | | - ], |
40 | | - "@semantic-release/github", |
41 | | - "semantic-release-stack-upload", |
42 | | - ] |
| 4 | + |
| 5 | +module.exports = async () => { |
| 6 | + const conventionalCommits = (await import('conventional-changelog-conventionalcommits')).default; |
| 7 | + |
| 8 | + return { |
| 9 | + branches: ["main"], |
| 10 | + tagFormat: "${version}", |
| 11 | + plugins: [ |
| 12 | + [ |
| 13 | + "@semantic-release/commit-analyzer", |
| 14 | + { |
| 15 | + "preset": "conventionalcommits", |
| 16 | + "releaseRules": [ |
| 17 | + { "type": "docs", "release": "patch" } |
| 18 | + ] |
| 19 | + } |
| 20 | + ], |
| 21 | + [ |
| 22 | + "@semantic-release/release-notes-generator", |
| 23 | + { |
| 24 | + "preset": "conventionalcommits", |
| 25 | + "presetConfig": { |
| 26 | + "types": conventionalCommits.DEFAULT_COMMIT_TYPES.map(element => |
| 27 | + element.type === "docs" |
| 28 | + ? { ...element, hidden: false } |
| 29 | + : element |
| 30 | + ) |
| 31 | + } |
| 32 | + } |
| 33 | + ], |
| 34 | + [ |
| 35 | + "semantic-release-mirror-version", |
| 36 | + { |
| 37 | + "fileGlob": "@(package.yaml|megaparsec-time.cabal)", |
| 38 | + "placeholderRegExp": "0.0.0-dev" |
| 39 | + } |
| 40 | + ], |
| 41 | + [ |
| 42 | + "@semantic-release/changelog", |
| 43 | + { |
| 44 | + changelogFile: "CHANGELOG.md", |
| 45 | + changelogTitle: "Changelog" |
| 46 | + } |
| 47 | + ], |
| 48 | + [ |
| 49 | + "@semantic-release/git", |
| 50 | + { |
| 51 | + assets: [ |
| 52 | + "CHANGELOG.md", |
| 53 | + ] |
| 54 | + } |
| 55 | + ], |
| 56 | + "@semantic-release/github", |
| 57 | + "semantic-release-stack-upload", |
| 58 | + ] |
| 59 | + } |
43 | 60 | } |
0 commit comments