From ac795534c771b12dc7877e6cb749996985981d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=BF=97=E5=BC=BA?= Date: Mon, 22 Jan 2024 13:49:22 +0800 Subject: [PATCH] fix: release version --- .github/workflows/build.yml | 50 +++++++++++++++++++++---------------- CHANGELOG.md | 33 ------------------------ components.d.ts | 15 +++++++++++ electron-builder.json5 | 2 +- 4 files changed, 44 insertions(+), 56 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3efa2cf..4c0bc17 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 16 - name: Install Dependencies run: npm install @@ -40,37 +40,43 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Cleanup Artifacts for MacOS + if: matrix.os == 'macos-latest' + run: | + npx rimraf "release/!(*.dmg)" + + - name: Cleanup Artifacts for Ubuntu + if: matrix.os == 'ubuntu-latest' + run: | + npx rimraf "release/!(*.AppImage)" + + - name: Cleanup Artifacts for Windows + if: matrix.os == 'windows-latest' + run: | + npx rimraf "release/!(*.exe)" + - name: Upload Artifact uses: actions/upload-artifact@v3 with: name: release_on_${{ matrix.os }} - path: release/ + path: release retention-days: 5 - release: - needs: build - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Download artifact - uses: actions/download-artifact@v3 - with: - name: release_artifact - path: release/ + - name: Extract Version + id: extract_version + run: | + echo "::set-output name=version::$(echo ${{ github.ref }} | sed 's/refs\/tags\///')" - name: Create Release and Upload Release Asset uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - tag_name: ${{ github.ref }} - name: Release ${{ github.ref }} - files: release/ - body: 'Release on ${{ github.ref }}' - prerelease: true - generate_release_notes: true - fail_on_unmatched_files: true + tag_name: ${{ steps.extract_version.outputs.version }} + name: Release ${{ steps.extract_version.outputs.version }} + files: 'release/**' + body: 'Release on ${{ steps.extract_version.outputs.version }}' + # prerelease: true + # generate_release_notes: true + # fail_on_unmatched_files: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index db6dbaa..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,33 +0,0 @@ -## 2022-10-03 - -[v2.1.0](https://github.com/electron-vite/electron-vite-vue/pull/267) - -- `vite-electron-plugin` is Fast, and WYSIWYG. 🌱 -- last-commit: db2e830 v2.1.0: use `vite-electron-plugin` instead `vite-plugin-electron` - -## 2022-06-04 - -[v2.0.0](https://github.com/electron-vite/electron-vite-vue/pull/156) - -- 🖖 Based on the `vue-ts` template created by `npm create vite`, integrate `vite-plugin-electron` -- ⚡️ More simplify, is in line with Vite project structure -- last-commit: a15028a (HEAD -> main) feat: hoist `process.env` - -## 2022-01-30 - -[v1.0.0](https://github.com/electron-vite/electron-vite-vue/releases/tag/v1.0.0) - -- ⚡️ Main、Renderer、preload, all built with vite - -## 2022-01-27 -- Refactor the scripts part. -- Remove `configs` directory. - -## 2021-11-11 -- Refactor the project. Use vite.config.ts build `Main-process`, `Preload-script` and `Renderer-process` alternative rollup. -- Scenic `Vue>=3.2.13`, `@vue/compiler-sfc` is no longer necessary. -- If you prefer Rollup, Use rollup branch. - -```bash -Error: @vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependency tree. -``` diff --git a/components.d.ts b/components.d.ts index f8f7c13..10e49f6 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,14 +8,29 @@ export {} declare module 'vue' { export interface GlobalComponents { ElAvatar: typeof import('element-plus/es')['ElAvatar'] + ElButton: typeof import('element-plus/es')['ElButton'] ElCol: typeof import('element-plus/es')['ElCol'] + ElDialog: typeof import('element-plus/es')['ElDialog'] + ElForm: typeof import('element-plus/es')['ElForm'] + ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] + ElImage: typeof import('element-plus/es')['ElImage'] + ElInput: typeof import('element-plus/es')['ElInput'] ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] + ElOption: typeof import('element-plus/es')['ElOption'] + ElPagination: typeof import('element-plus/es')['ElPagination'] ElRow: typeof import('element-plus/es')['ElRow'] + ElSelect: typeof import('element-plus/es')['ElSelect'] + ElTable: typeof import('element-plus/es')['ElTable'] + ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElUpload: typeof import('element-plus/es')['ElUpload'] Header: typeof import('./src/components/Header.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SideBar: typeof import('./src/components/SideBar.vue')['default'] } + export interface ComponentCustomProperties { + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] + } } diff --git a/electron-builder.json5 b/electron-builder.json5 index 6f4a42e..1c770d0 100644 --- a/electron-builder.json5 +++ b/electron-builder.json5 @@ -7,7 +7,7 @@ asar: true, productName: 'wechat-assistant', directories: { - output: 'release/${version}' + output: 'release' }, files: ['dist', 'dist-electron'], mac: {