Merge branch 'automatic-changelog' into 'master'

Automatic changelog generation

See merge request dungeonslayers/ds4!141
This commit is contained in:
Johannes Loher 2021-09-14 16:54:07 +00:00
commit 1c21d70f6c
6 changed files with 1093 additions and 20 deletions

View file

@ -74,6 +74,20 @@ publish-artifacts:
rules: rules:
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/' - if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
changelog:
stage: publish
before_script:
- yarn install --immutable
script:
- yarn changelog
cache:
<<: *global_cache
artifacts:
paths:
- CHANGELOG.md
rules:
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
.release-template: &release-template .release-template: &release-template
stage: release stage: release
before_script: before_script:
@ -125,7 +139,7 @@ release:
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/' - if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
release: release:
tag_name: $CI_COMMIT_TAG tag_name: $CI_COMMIT_TAG
description: "# Changelog" description: "./CHANGELOG.md"
assets: assets:
links: links:
- name: "ds4.zip" - name: "ds4.zip"

9
.husky/commit-msg Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2021 Johannes Loher
#
# SPDX-License-Identifier: MIT
. "$(dirname "$0")/_/husky.sh"
yarn run commitlint --edit "$1"

7
changelog.config.js Normal file
View file

@ -0,0 +1,7 @@
// SPDX-FileCopyrightText: 2021 Johannes Loher
//
// SPDX-License-Identifier: MIT
const config = require("conventional-changelog-conventionalcommits");
module.exports = config();

5
commitlint.config.js Normal file
View file

@ -0,0 +1,5 @@
// SPDX-FileCopyrightText: 2021 Johannes Loher
//
// SPDX-License-Identifier: MIT
module.exports = { extends: ["@commitlint/config-conventional"] };

View file

@ -50,15 +50,20 @@
"test:ci": "jest --ci --reporters=default --reporters=jest-junit", "test:ci": "jest --ci --reporters=default --reporters=jest-junit",
"format": "prettier --write \"./**/*.(ts|js|json|scss)\"", "format": "prettier --write \"./**/*.(ts|js|json|scss)\"",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"postinstall": "husky install" "postinstall": "husky install",
"changelog": "conventional-changelog -n changelog.config.js -o CHANGELOG.md"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "13.1.0",
"@commitlint/config-conventional": "13.1.0",
"@league-of-foundry-developers/foundry-vtt-types": "0.8.8-9", "@league-of-foundry-developers/foundry-vtt-types": "0.8.8-9",
"@types/fs-extra": "9.0.12", "@types/fs-extra": "9.0.12",
"@types/jest": "27.0.1", "@types/jest": "27.0.1",
"@typescript-eslint/eslint-plugin": "4.31.1", "@typescript-eslint/eslint-plugin": "4.31.1",
"@typescript-eslint/parser": "4.31.1", "@typescript-eslint/parser": "4.31.1",
"chalk": "4.1.2", "chalk": "4.1.2",
"conventional-changelog-cli": "2.1.1",
"conventional-changelog-conventionalcommits": "4.6.1",
"eslint": "7.32.0", "eslint": "7.32.0",
"eslint-config-prettier": "8.3.0", "eslint-config-prettier": "8.3.0",
"eslint-plugin-jest": "24.4.0", "eslint-plugin-jest": "24.4.0",

1069
yarn.lock

File diff suppressed because it is too large Load diff