Skip to content

Commit

Permalink
Merge pull request #5 from kernpunkt/feat/release-management
Browse files Browse the repository at this point in the history
Feat/release management
  • Loading branch information
joerncodes authored Sep 26, 2023
2 parents c5505a6 + 4140547 commit a7f204e
Show file tree
Hide file tree
Showing 6 changed files with 3,374 additions and 61 deletions.
1 change: 1 addition & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": ["@commitlint/config-conventional"] }
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

on:
push:
branches: [main]
workflow_dispatch:

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- name: Install dependencies
run: yarn
- name: Create release
run: yarn semantic-release
- name: push main to release
run: |
git fetch
git checkout release
git pull origin main
git push --set-upstream origin release
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit
30 changes: 30 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
},
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/github",
{
"assets": [
"CHANGELOG.md",
"package.json"
],
"message": "chore(release): set `package.json` to ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/git"
]
}
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
"test:unit": "jest test/unit"
},
"devDependencies": {
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/crypto-js": "^4.1.1",
"@types/figlet": "^1.5.6",
"@types/jest": "^29.5.1",
Expand All @@ -44,6 +48,7 @@
"jest": "^29.5.0",
"lint-staged": "^13.2.1",
"prettier": "^2.8.8",
"semantic-release": "^22.0.5",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"typescript": "~4.9.5"
Expand Down
Loading

0 comments on commit a7f204e

Please sign in to comment.