Update electron.yml
This commit is contained in:
parent
fea5f32f99
commit
3b07b3ab5b
55
.github/workflows/electron.yml
vendored
55
.github/workflows/electron.yml
vendored
@ -3,50 +3,29 @@ name: Sandbox Clinic Desktop
|
|||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
release:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Context
|
- name: Check out Git repository
|
||||||
env:
|
uses: actions/checkout@v1
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
||||||
run: echo "$GITHUB_CONTEXT"
|
- name: Install Node.js, NPM and Yarn
|
||||||
- uses: actions/checkout@v1
|
|
||||||
with:
|
|
||||||
fetch-depth: 1
|
|
||||||
- name: Use Node.js 10.x
|
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 10.x
|
node-version: 10
|
||||||
- name: yarn install
|
|
||||||
run: |
|
- name: Build/release Electron app
|
||||||
yarn install
|
uses: samuelmeuli/action-electron-builder@v1
|
||||||
- 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:
|
with:
|
||||||
name: ${{matrix.os}}
|
# GitHub token, automatically provided to the action
|
||||||
path: artifacts
|
# (No need to define this secret in the repo settings)
|
||||||
- name: Release
|
github_token: ${{ secrets.github_token }}
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
# If the commit is tagged with a version (e.g. "v1.0.0"),
|
||||||
with:
|
# release the app after building
|
||||||
files: "artifacts/**"
|
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user