Files
WeFlow/.github/workflows/release.yml
2026-01-10 14:00:22 +08:00

56 lines
1.4 KiB
YAML

name: Build and Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
runs-on: windows-latest
steps:
- name: Check out git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install Dependencies
run: npm install
- name: Build Frontend & Type Check
run: |
npx tsc
npx vite build
- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
outputFile: "release-notes.md"
configurationJson: |
{
"categories": [
{ "title": "## 🚀 Features", "labels": ["feat", "feature"] },
{ "title": "## 🐛 Fixes", "labels": ["fix", "bug"] },
{ "title": "## 🧰 Maintenance", "labels": ["chore", "refactor", "docs", "perf"] }
],
"template": "# Release Notes\n\n{{CHANGELOG}}"
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Package and Publish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx electron-builder --publish always "-c.releaseInfo.releaseNotesFile=release-notes.md"