From 78fca4cc94b8d0187ac855e5295ff91411443011 Mon Sep 17 00:00:00 2001 From: log1997 <2694233102@qq.com> Date: Fri, 5 Dec 2025 17:17:28 +0800 Subject: [PATCH] ci: actions --- .github/workflows/release.yml | 74 +++++++++++++++++++++++++++++++++++ src/components.d.ts | 1 + 2 files changed, 75 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d510f69 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,74 @@ +name: Build and Release + +on: + push: + tags: + - 'v*' + +jobs: + build-and-release: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '22.x' + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Build for production + run: pnpm build + + - name: Build for file protocol + run: pnpm build:file + + - name: Rename dist folders + run: | + mv dist dist-prod + mv dist-prod/index.html dist-prod/404.html + mv dist-file dist-file-prod + + - name: Create source code archive + run: | + tar -czf source-code.tar.gz \ + --exclude='.git' \ + --exclude='node_modules' \ + --exclude='dist-prod' \ + --exclude='dist-file-prod' \ + --exclude='*.tar.gz' \ + . + + - name: Create production build archive + run: | + tar -czf production-build.tar.gz dist-prod + + - name: Create file protocol build archive + run: | + tar -czf file-protocol-build.tar.gz dist-file-prod + + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: | + source-code.tar.gz + production-build.tar.gz + file-protocol-build.tar.gz + draft: true + prerelease: false + generate_release_notes: true \ No newline at end of file diff --git a/src/components.d.ts b/src/components.d.ts index 8db03bd..89b8fbe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -2,6 +2,7 @@ // @ts-nocheck // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 +// biome-ignore lint: disable export {} /* prettier-ignore */