Merge pull request #90 from LOG1997/feature-actions

Feature actions
This commit is contained in:
LOG1997
2025-12-05 17:49:38 +08:00
committed by GitHub
4 changed files with 187 additions and 123 deletions

62
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,62 @@
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: Prepare directories
run: |
mv dist dist-prod
mv dist-prod/index.html dist-prod/404.html
- name: Create production build archive
run: |
tar -czf dist.tar.gz dist-prod
- name: Create file protocol build archive
run: |
tar -czf dist-file.tar.gz dist-file
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
dist.tar.gz
dist-file.tar.gz
draft: true
prerelease: false
generate_release_notes: true

View File

@@ -1,7 +1,7 @@
{ {
"name": "log-lottery", "name": "log-lottery",
"private": true, "private": true,
"version": "0.0.3", "version": "0.0.4",
"type": "module", "type": "module",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {

1
src/components.d.ts vendored
View File

@@ -2,6 +2,7 @@
// @ts-nocheck // @ts-nocheck
// Generated by unplugin-vue-components // Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399 // Read more: https://github.com/vuejs/core/pull/3399
// biome-ignore lint: disable
export {} export {}
/* prettier-ignore */ /* prettier-ignore */

View File

@@ -107,6 +107,7 @@ export default defineConfig(({ mode }) => {
}, },
}, },
build: { build: {
outDir: mode === 'file' ? 'dist-file' : 'dist',
minify: 'terser', minify: 'terser',
terserOptions: { terserOptions: {
compress: { compress: {