Files
nezha-dash-v1/.github/workflows/Build.yml
T
仓鼠 8a2d8d67bd Refactor CI workflows and add Dependabot configuration (#67)
* fix: remove duplicate pnpm setup step in CI and build workflows

* fix: remove version specification for pnpm setup in CI and build workflows

* feat: add Dependabot configuration for GitHub Actions updates

* chore: auto-fix linting and formatting issues
2026-06-04 11:24:59 +08:00

50 lines
1.0 KiB
YAML

name: Build and release static export
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build static export
run: |
pnpm run build
- name: Compress dist folder
run: zip -r dist.zip dist
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') }}
files: dist.zip
- name: Changelog
run: pnpm dlx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}