From 2983c06371ceb0fa015a42369fafff65616d88d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=BE=E4=BA=86=E4=B8=AA=E8=90=8C?= Date: Tue, 14 Mar 2023 13:27:17 +0800 Subject: [PATCH] ci: fix #27 --- .github/workflows/package.yml | 51 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 4427b2f08a..56553260c2 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -69,10 +69,6 @@ jobs: matrix: platform: [macos-latest] target: [aarch64-apple-darwin, x86_64-apple-darwin] - bundle: [dmg, macos] - include: - - bundle: dmg - ext: dmg runs-on: ${{ matrix.platform }} steps: @@ -96,13 +92,13 @@ jobs: run: pnpm install - name: Build and Package run: | - pnpm tauri build --target ${{ matrix.target }} -b ${{ matrix.bundle }} + pnpm tauri build --target ${{ matrix.target }} - name: Upload Artifacts uses: actions/upload-artifact@v3 with: - name: pot_${{ matrix.target }}.${{ matrix.ext }} - path: src-tauri/target/${{ matrix.target }}/release/bundle/${{ matrix.bundle }}/*.${{ matrix.ext }} + name: pot_${{ matrix.target }}.dmg + path: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg if-no-files-found: error - name: Upload Release @@ -111,7 +107,7 @@ jobs: with: body_path: CHANGELOG token: ${{ secrets.RELEASE_TOKEN }} - files: src-tauri/target/${{ matrix.target }}/release/bundle/${{ matrix.bundle }}/*.${{ matrix.ext }} + files: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg build-for-linux: needs: change-version strategy: @@ -119,12 +115,6 @@ jobs: matrix: platform: [ubuntu-latest] target: [x86_64-unknown-linux-gnu] - bundle: [deb, appimage] - include: - - bundle: deb - ext: deb - - bundle: appimage - ext: AppImage runs-on: ${{ matrix.platform }} steps: @@ -152,20 +142,33 @@ jobs: run: pnpm install - name: Build and Package run: | - pnpm tauri build --target ${{ matrix.target }} -b ${{ matrix.bundle }} + pnpm tauri build --target ${{ matrix.target }} - name: Upload Artifacts uses: actions/upload-artifact@v3 with: - name: pot_${{ matrix.target }}.${{ matrix.ext }} - path: src-tauri/target/${{ matrix.target }}/release/bundle/${{ matrix.bundle }}/*.${{ matrix.ext }} + name: pot_${{ matrix.target }}.deb + path: src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb if-no-files-found: error + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: pot_${{ matrix.target }}.AppImage + path: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage + if-no-files-found: error + - name: Upload Release + if: startsWith(github.ref, 'refs/tags') + uses: softprops/action-gh-release@v1 + with: + body_path: CHANGELOG + token: ${{ secrets.RELEASE_TOKEN }} + files: src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb - name: Upload Release if: startsWith(github.ref, 'refs/tags') uses: softprops/action-gh-release@v1 with: body_path: CHANGELOG token: ${{ secrets.RELEASE_TOKEN }} - files: src-tauri/target/${{ matrix.target }}/release/bundle/${{ matrix.bundle }}/*.${{ matrix.ext }} + files: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage build-for-windows: needs: change-version-for-windows strategy: @@ -173,10 +176,6 @@ jobs: matrix: platform: [windows-latest] target: [x86_64-pc-windows-msvc] - bundle: [msi] - include: - - bundle: msi - ext: msi runs-on: ${{ matrix.platform }} steps: @@ -200,12 +199,12 @@ jobs: run: pnpm install - name: Build and Package run: | - pnpm tauri build --target ${{ matrix.target }} -b ${{ matrix.bundle }} + pnpm tauri build --target ${{ matrix.target }} - name: Upload Artifacts uses: actions/upload-artifact@v3 with: - name: pot_${{ matrix.target }}.${{ matrix.ext }} - path: src-tauri/target/${{ matrix.target }}/release/bundle/${{ matrix.bundle }}/*.${{ matrix.ext }} + name: pot_${{ matrix.target }}.msi + path: src-tauri/target/${{ matrix.target }}/release/bundle/msi/*.msi if-no-files-found: error - name: Upload Release if: startsWith(github.ref, 'refs/tags') @@ -213,4 +212,4 @@ jobs: with: body_path: CHANGELOG token: ${{ secrets.RELEASE_TOKEN }} - files: src-tauri/target/${{ matrix.target }}/release/bundle/${{ matrix.bundle }}/*.${{ matrix.ext }} \ No newline at end of file + files: src-tauri/target/${{ matrix.target }}/release/bundle/msi/*.msi \ No newline at end of file