Update electron.yml

This commit is contained in:
Sambo Chea 2020-02-13 13:58:40 +07:00 committed by GitHub
parent fea5f32f99
commit 3b07b3ab5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,50 +3,29 @@ name: Sandbox Clinic Desktop
on: [push]
jobs:
build:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: yarn install
run: |
yarn install
- name: Publish
run: |
yarn run dist
- name: Cleanup artifacts
if: matrix.os != 'windows-latest'
run: |
mkdir artifacts
mv "dist/(*.exe,*.deb,*.AppImage,*.dmg)" artifacts || true
- name: Cleanup artifacts Win
if: matrix.os == 'windows-latest'
run: |
mkdir artifacts
mv dist/*.exe artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: ${{matrix.os}}
path: artifacts
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "artifacts/**"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Check out Git repository
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 10
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
# 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') }}