Skip to content

Commit

Permalink
chore: github action
Browse files Browse the repository at this point in the history
  • Loading branch information
funnyzak committed Oct 28, 2021
1 parent d25cc70 commit 6c58f15
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
jobs:
release:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
Expand All @@ -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') }}

0 comments on commit 6c58f15

Please sign in to comment.