build test

This commit is contained in:
lutinglt
2025-12-02 14:37:32 +08:00
parent 86e488aafb
commit 76e547987b
3 changed files with 56 additions and 1 deletions

49
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: release
on:
push:
branches:
- main
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
src:
- "scripts/*"
- "src/*.ts"
- "styles/*.ts"
- "themes/*.ts"
- "vite.config.ts"
- "package.json"
- name: Build theme
id: build
if: steps.changes.outputs.src == 'true'
run: |
npm install
npm run build
env:
GH_TOKEN: ${{ github.token }}
- name: Upload css assets
if: steps.build.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: themes
path: dist/*.css
- name: Upload templates assets
if: steps.build.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: templates
path: templates