Skip to content

Commit

Permalink
Merge pull request #546 from jansule/semantic-release
Browse files Browse the repository at this point in the history
ci: setup commitlint and semantic-release
  • Loading branch information
jansule authored Jun 18, 2024
2 parents 3af3904 + 42dca96 commit 15a5120
Show file tree
Hide file tree
Showing 6 changed files with 9,181 additions and 6,087 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
};
13 changes: 13 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Lint Commit Messages
on: [pull_request, push]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
with:
configFile: .commitlintrc.js
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
workflow_dispatch:

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout sources 🔰
uses: actions/checkout@v4

- name: Setup Node.js 20 👷🏻
uses: actions/setup-node@v4
with:
node-version: 20

- name: Prepare git config
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Install dependencies ⏬
run: npm ci

- name: Build artifacts 🏗️
run: npm run build

- name: Release 🚀
uses: cycjimmy/[email protected]
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
32 changes: 32 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"branches": ["master"],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"header": "Changelog of GeoStyler QGIS Parser"
}
}
],
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md", "package.json", "package-lock.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
Loading

0 comments on commit 15a5120

Please sign in to comment.