chore(release): introduce release pipeline

This commit is contained in:
Jonas Dellinger
2022-06-04 10:14:51 +02:00
parent f101e23c1c
commit aec27a18a7
6 changed files with 11700 additions and 7 deletions

3
.commitlintrc.json Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}

29
.github/workflows/release.yaml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-22.04
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup | Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup | Dependencies
run: npm ci
- name: Test
run: npm test
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm exec semantic-release

4
.husky/commit-msg Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx --no -- commitlint --edit "${1}"

16
.releaserc.json Normal file
View File

@@ -0,0 +1,16 @@
{
"branches": ["main", "dev"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/github",
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md", "package.json"],
"message": "chore(release): ${nextRelease.version} [CI SKIP]\n\n${nextRelease.notes}"
}
]
]
}

11639
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,9 @@
"build": "shx rm -rf dist && tsc -b",
"dev": "tsc -b -w",
"prepack": "npm run build",
"test": "jest"
"test": "jest",
"postinstall": "husky install",
"commit": "git-cz"
},
"files": [
"/lib",
@@ -32,13 +34,25 @@
"url": "https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues"
},
"homepage": "https://github.com/SteamDeckHomebrew/decky-frontend-lib#readme",
"config": {
"commitizen": {
"path": "@commitlint/cz-commitlint"
}
},
"devDependencies": {
"@commitlint/config-conventional": "^17.0.2",
"@commitlint/cz-commitlint": "^17.0.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@types/jest": "^27.4.1",
"@types/react": "16.14.0",
"@types/react-router": "5.1.18",
"commitizen": "^4.2.4",
"husky": "^8.0.1",
"import-sort-style-module": "^6.0.0",
"jest": "^27.5.1",
"prettier-plugin-import-sort": "^0.0.7",
"semantic-release": "^19.0.2",
"shx": "^0.3.4",
"ts-jest": "^27.1.4",
"typescript": "^4.6.3"