add semantic release

This commit is contained in:
Thomas Nordquist
2024-05-10 18:05:41 +02:00
parent cc9cc411f0
commit b9a5a5f1d8
4 changed files with 2458 additions and 36 deletions

View File

@@ -4,6 +4,8 @@ on:
push: push:
branches: branches:
- master - master
- alpha
- beta
concurrency: concurrency:
group: ${{ github.ref }} group: ${{ github.ref }}
@@ -30,6 +32,9 @@ jobs:
node-version: 18 node-version: 18
- run: npm install -g yarn - run: npm install -g yarn
- run: yarn - run: yarn
- run: npx semantic-release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: yarn build - run: yarn build
- run: yarn prepare-release - run: yarn prepare-release
- run: yarn package ${{ matrix.build.task }} - run: yarn package ${{ matrix.build.task }}

View File

@@ -27,7 +27,8 @@
"package": "ts-node package.ts", "package": "ts-node package.ts",
"ui-test": "./scripts/uiTests.sh", "ui-test": "./scripts/uiTests.sh",
"upload-video-artifacts": "./scripts/uploadVideoAsset.ts ui-test.mp4 ui-test.gif", "upload-video-artifacts": "./scripts/uploadVideoAsset.ts ui-test.mp4 ui-test.gif",
"package-with-docker": "./scripts/package-with-docker.sh" "package-with-docker": "./scripts/package-with-docker.sh",
"updateVersion": "semantic-release"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@@ -78,6 +79,9 @@
"@babel/runtime": "^7.17.2", "@babel/runtime": "^7.17.2",
"@cspell/dict-typescript": "^3.1.2", "@cspell/dict-typescript": "^3.1.2",
"@electron/notarize": "^2.3.0", "@electron/notarize": "^2.3.0",
"@semantic-release/commit-analyzer": "^12.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^12.0.1",
"@types/chai": "^4.1.7", "@types/chai": "^4.1.7",
"@types/fs-extra": "8", "@types/fs-extra": "8",
"@types/lowdb": "^1.0.6", "@types/lowdb": "^1.0.6",
@@ -100,6 +104,8 @@
"playwright": "^1.43.0", "playwright": "^1.43.0",
"prettier": "^3.2.5", "prettier": "^3.2.5",
"redux-thunk": "^2.3.0", "redux-thunk": "^2.3.0",
"semantic-release": "^23.0.8",
"semantic-release-export-data": "^1.0.1",
"source-map-support": "^0.5.9", "source-map-support": "^0.5.9",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"tslint": "^6.1.3", "tslint": "^6.1.3",
@@ -125,4 +131,4 @@
"uuid": "^8.3.2", "uuid": "^8.3.2",
"yarn-run-all": "^3.1.1" "yarn-run-all": "^3.1.1"
} }
} }

20
release.config.js Normal file
View File

@@ -0,0 +1,20 @@
module.exports = {
branches: ['master', { name: 'beta', prerelease: true }, { name: 'alpha', prerelease: true }],
plugins: [
'@semantic-release/commit-analyzer',
'semantic-release-export-data',
'@semantic-release/changelog',
[
'@semantic-release/npm',
{
npmPublish: false,
},
],
[
'@semantic-release/git',
{
assets: ['package.json', 'yarn.lock'],
},
],
],
}

2459
yarn.lock

File diff suppressed because it is too large Load Diff