From 6c58f152c47a87d53aadce1711b0e42bc603a2d9 Mon Sep 17 00:00:00 2001 From: Leon Date: Thu, 28 Oct 2021 09:52:00 +0800 Subject: [PATCH] chore: github action --- .github/workflows/build.yml | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed29172..6810f87 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,6 @@ on: jobs: release: runs-on: ${{ matrix.os }} - strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] @@ -32,14 +31,27 @@ jobs: working-directory: ./ run: | npm install - - name: Build/release Electron app - uses: samuelmeuli/action-electron-builder@v1 + npm run build + - name: Archive Dist + uses: papeloto/action-zip@v1 + with: + files: build/binary + recursive: false + dest: ${{ matrix.os }}_binary.zip + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') with: - build_script_name: dist - # GitHub token, automatically provided to the action - # (No need to define this secret in the repo settings) - github_token: ${{ secrets.github_token }} + files: | + ${{ matrix.os }}_binary.zip + # - name: Build/release Electron app + # uses: samuelmeuli/action-electron-builder@v1 + # with: + # build_script_name: dist + # # GitHub token, automatically provided to the action + # # (No need to define this secret in the repo settings) + # github_token: ${{ secrets.github_token }} - # If the commit is tagged with a version (e.g. "v1.0.0"), - # release the app after building - release: ${{ startsWith(github.ref, 'refs/tags/v') }} + # # If the commit is tagged with a version (e.g. "v1.0.0"), + # # release the app after building + # release: ${{ startsWith(github.ref, 'refs/tags/v') }}