Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Commit lint
run-name: Linting ${{ github.event.pull_request.commits }} commits

on:
pull_request:
types:
- opened
- synchronize

jobs:
lint:
name: Lint commit messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- run: npm ci --omit=optional
- run: npx commitlint --from=${{ github.event.pull_request.base.sha }}
39 changes: 0 additions & 39 deletions .github/workflows/npm-publish.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Semantic Release

on:
workflow_run:
workflows: [Test]
branches: [main]
types:
- completed

jobs:
release:
# check Test success
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- run: npm ci
- run: npx semantic-release
env:
NPM_TOKEN: ${{ secrets.npm_token }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI
name: Test

on:
push:
Expand Down
21 changes: 21 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
"@semantic-release/npm",
"@semantic-release/github"
]
}
7 changes: 7 additions & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
rules: {
// lower severity to warning to allow longer lines
'body-max-line-length': [1, 'always', 120]
},
extends: ['@commitlint/config-conventional']
}
Loading