Skip to content

Commit 8eddf11

Browse files
feat: add semantic-release automation
1 parent d02969f commit 8eddf11

10 files changed

Lines changed: 13849 additions & 1549 deletions

File tree

.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.github/workflows/commitlint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lint Commits
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
commitlint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
12+
with:
13+
fetch-depth: 0
14+
persist-credentials: false
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
18+
with:
19+
node-version: '24'
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Validate commit messages
25+
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
workflow_run:
5+
workflows: [Build and Test]
6+
types: [completed]
7+
branches:
8+
- master
9+
10+
permissions:
11+
contents: write
12+
issues: write
13+
pull-requests: write
14+
id-token: write
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
environment: release
20+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
with:
26+
fetch-depth: 0
27+
persist-credentials: false
28+
- name: Setup Node.js
29+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
30+
with:
31+
node-version: '24'
32+
33+
- name: Install dependencies
34+
run: npm ci
35+
36+
- name: Release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
NPM_CONFIG_PROVENANCE: true
40+
run: npx semantic-release

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit $1

.releaserc.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"branches": ["master"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/changelog",
7+
[
8+
"@semantic-release/npm",
9+
{
10+
"npmPublish": true,
11+
"pkgRoot": "."
12+
}
13+
],
14+
"@semantic-release/github",
15+
[
16+
"@semantic-release/git",
17+
{
18+
"assets": ["CHANGELOG.md", "package.json", "package-lock.json"],
19+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
20+
}
21+
]
22+
]
23+
}

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and uses [Conventional Commits](https://www.conventionalcommits.org/) for automated changelog generation.
6+
7+
The changelog is automatically updated by [semantic-release](https://github.com/semantic-release/semantic-release) on each release.

Jenkinsfile

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)