2020-02-13 12:42:46 +07:00
|
|
|
name: Sandbox Clinic Electron CD
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
|
|
|
|
|
|
steps:
|
2020-02-13 13:00:37 +07:00
|
|
|
- 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
|
2020-02-13 12:42:46 +07:00
|
|
|
- name: Cleanup artifacts Win
|
2020-02-13 13:00:37 +07:00
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
run: |
|
|
|
|
mkdir artifacts
|
|
|
|
mv dist/*.exe artifacts
|
2020-02-13 12:42:46 +07:00
|
|
|
- name: Upload artifacts
|
2020-02-13 13:00:37 +07:00
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2020-02-13 12:42:46 +07:00
|
|
|
name: ${{matrix.os}}
|
|
|
|
path: artifacts
|
|
|
|
- name: Release
|
2020-02-13 13:00:37 +07:00
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
2020-02-13 12:42:46 +07:00
|
|
|
files: "artifacts/**"
|
2020-02-13 13:00:37 +07:00
|
|
|
env:
|
2020-02-13 12:42:46 +07:00
|
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|