ci: setup semantic release configuration and github actions workflow

This commit is contained in:
Draculabo committed 2026-01-25 05:07:39 +08:00
1 parent 89f39710c7
commit d2945a6e8a
4 files changed
+6071

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
name: Release
on:
push:
branches:
- main
- master
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for semantic-release to analyze commits
persist-credentials: false # We use a token in the next steps
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # Use GH_TOKEN to trigger other workflows
run: npx semantic-release