Skip to content

Commit 4a560c6

Browse files
authored
Merge pull request #428 from scratchfoundation/implement-semantic-release
Update semantic release config
2 parents 4341b19 + 84e8bd0 commit 4a560c6

8 files changed

+15802
-16110
lines changed

.github/workflows/ci-cd.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: CI/CD
22

33
on:
44
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
5-
pull_request: # Runs whenever a pull request is created or updated
65
push: # Runs whenever a commit is pushed to the repository
7-
branches: [master, develop, hotfix/*, release]
86

97
concurrency:
108
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
@@ -24,7 +22,7 @@ jobs:
2422

2523
- uses: wagoid/commitlint-github-action@v5
2624
if: github.event_name == 'pull_request'
27-
25+
2826
- uses: actions/setup-node@v3
2927
with:
3028
cache: "npm"
@@ -50,4 +48,4 @@ jobs:
5048
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5149
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5250
run: |
53-
npx --no -- semantic-release
51+
npx --no -- semantic-release

.github/workflows/commitlint.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Lint commit messages
2+
on: [pull_request]
3+
4+
concurrency:
5+
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.sha }}"
6+
7+
jobs:
8+
commitlint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: wagoid/commitlint-github-action@v5

.husky/.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=lf

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit "$1"

commitlint.config.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
module.exports = {extends: ['@commitlint/config-conventional']};
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
ignores: [message => message.startsWith('chore(release):')]
4+
};

0 commit comments

Comments
 (0)