Skip to content

Commit

Permalink
ci: add semantic release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Eiko Wagenknecht <[email protected]>
  • Loading branch information
eikowagenknecht committed Feb 7, 2025
1 parent d5f4839 commit cc93bed
Show file tree
Hide file tree
Showing 6 changed files with 1,728 additions and 16 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Create a new release manually using semantic-release

name: create-release

on:
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm run build

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Generate release
run: pnpm dlx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/quality-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: "22"
node-version: "lts/*"
cache: "pnpm"

- name: Install dependencies
Expand Down
21 changes: 21 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/git",
{
"assets": ["package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
12 changes: 0 additions & 12 deletions TODO.md

This file was deleted.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"@commitlint/config-conventional": "19.7.1",
"@commitlint/types": "19.5.0",
"@eslint/js": "9.19.0",
"@semantic-release/git": "10.0.1",
"@testing-library/jest-dom": "6.6.3",
"@types/better-sqlite3": "7.6.12",
"@types/luxon": "3.4.2",
Expand All @@ -82,6 +83,7 @@
"knip": "5.43.6",
"lefthook": "1.10.10",
"prettier": "3.4.2",
"semantic-release": "24.2.1",
"typescript": "5.7.3",
"typescript-eslint": "8.23.0",
"vite": "6.1.0",
Expand Down
Loading

0 comments on commit cc93bed

Please sign in to comment.