mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 01:21:56 +08:00
56 lines
1.1 KiB
YAML
56 lines
1.1 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
|
|
|
|
- name: Set up Bun
|
|
uses: oven-sh/setup-bun@v1
|
|
with:
|
|
bun-version: "latest"
|
|
|
|
- name: Install dependencies
|
|
run: bun install
|
|
|
|
- name: Build static export
|
|
run: |
|
|
bun run build --base=/dashboard
|
|
|
|
- name: Compress dist folder
|
|
run: zip -r dist.zip dist
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: dist.zip
|
|
|
|
changelog:
|
|
needs: release
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
registry-url: https://registry.npmjs.org/
|
|
node-version: lts/*
|
|
|
|
- run: npx changelogithub
|
|
env:
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|