mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2026-04-01 15:26:54 +00:00
feat: upgrade to commitlint v19
BREAKING CHANGE: `commitlint.config.js` is not supported anymore, please use `.mjs` extension
This commit is contained in:
parent
9763196e10
commit
732f0ad7d5
24 changed files with 2431 additions and 13465 deletions
4
.github/tasks/actionYamlUpdater.js
vendored
4
.github/tasks/actionYamlUpdater.js
vendored
|
|
@ -3,10 +3,10 @@ const yaml = require('yaml')
|
|||
|
||||
const versionRegex = /\d+\.\d+\.\d+/
|
||||
|
||||
module.exports.readVersion = (contents) =>
|
||||
exports.readVersion = (contents) =>
|
||||
yaml.parse(contents).runs.image.match(versionRegex)[0]
|
||||
|
||||
module.exports.writeVersion = (contents, version) => {
|
||||
exports.writeVersion = (contents, version) => {
|
||||
const actionFile = yaml.parse(contents)
|
||||
actionFile.runs.image = actionFile.runs.image.replace(versionRegex, version)
|
||||
|
||||
|
|
|
|||
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
|
@ -55,7 +55,13 @@ jobs:
|
|||
git config user.email 'github-action@users.noreply.github.com'
|
||||
git config user.name 'GitHub Action'
|
||||
- name: Update versions and changelog
|
||||
run: npx commit-and-tag-version
|
||||
run: |
|
||||
# remove `"type": "module"` from package.json since `commit-and-tag-version` doesn't support it
|
||||
sed -i '/"type": "module",/c\' package.json
|
||||
npx commit-and-tag-version
|
||||
# bring back `"type": "module"`
|
||||
sed -i 's/"private": true,/"private": true,\n "type": "module",/' package.json
|
||||
git commit --amend --no-edit
|
||||
- name: Set VERSION env var
|
||||
run: |
|
||||
version=`node -p "require('./package.json').version"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue