From 2e30841d7e5d3fe4249d269b500279aeb3696b8f Mon Sep 17 00:00:00 2001 From: hello8693 <1320998105@qq.com> Date: Wed, 28 Aug 2024 19:36:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E5=8F=91=E5=B8=83=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E4=B8=AD=E5=8A=A8=E6=80=81=E8=8E=B7=E5=8F=96=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E5=8F=8A=E6=9B=B4=E6=96=B0=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 198eb93..0c37dbe 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,3 +1,4 @@ +# .github/workflows/publish.yaml name: Build and Package Electron App on Release on: @@ -47,13 +48,17 @@ jobs: if: matrix.os == 'ubuntu-latest' && github.event.release.prerelease == false run: yarn build:linux + - name: Get version from package.json + id: get_version + run: echo "::set-output name=version::$(node -p \"require('./package.json').version\")" + - name: Upload artifact for Windows if: matrix.os == 'windows-latest' uses: actions/upload-release-asset@v1 with: upload_url: ${{ github.event.release.upload_url }} - asset_path: dist/*.exe - asset_name: ExamShowboard-Windows-amd64.exe + asset_path: dist/dsz-exam-showboard-${{ steps.get_version.outputs.version }}-setup.exe + asset_name: ExamShowboard-Windows-amd64-${{ steps.get_version.outputs.version }}-setup.exe asset_content_type: application/octet-stream - name: Upload artifact for macOS @@ -61,8 +66,8 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ github.event.release.upload_url }} - asset_path: dist/*.dmg - asset_name: ExamShowboard-macOS-arm64.dmg + asset_path: dist/dsz-exam-showboard-${{ steps.get_version.outputs.version }}.dmg + asset_name: ExamShowboard-macOS-arm64-${{ steps.get_version.outputs.version }}.dmg asset_content_type: application/octet-stream - name: Upload artifact for Linux @@ -70,6 +75,6 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ github.event.release.upload_url }} - asset_path: dist/*.AppImage - asset_name: ExamShowboard-Linux.AppImage + asset_path: dist/dsz-exam-showboard-${{ steps.get_version.outputs.version }}.AppImage + asset_name: ExamShowboard-Linux-amd64-${{ steps.get_version.outputs.version }}-setup.AppImage asset_content_type: application/octet-stream