2020-03-15 20:10:38 +00:00
|
|
|
name: Electron app
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- production
|
2020-03-15 08:35:34 +00:00
|
|
|
|
2020-03-14 15:51:23 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-03-15 19:28:09 +00:00
|
|
|
os: [ubuntu-18.04, windows-2016]
|
2020-03-14 15:58:58 +00:00
|
|
|
# os: [macOS-10.14, windows-2016, ubuntu-18.04]
|
2020-03-14 15:51:23 +00:00
|
|
|
|
|
|
|
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
|
2020-03-15 20:10:38 +00:00
|
|
|
- name: Publish
|
2020-03-14 15:51:23 +00:00
|
|
|
run: |
|
2020-03-15 20:10:38 +00:00
|
|
|
yarn run build:app
|
2020-03-15 19:42:29 +00:00
|
|
|
|
2020-03-15 20:10:38 +00:00
|
|
|
- name: Cleanup artifacts
|
2020-03-15 19:42:29 +00:00
|
|
|
if: matrix.os != 'windows-2016'
|
2020-03-14 15:51:23 +00:00
|
|
|
run: |
|
2020-03-15 19:42:29 +00:00
|
|
|
mkdir artifacts
|
|
|
|
mv "app/dist/(*.exe,*.deb,*.AppImage,*.dmg)" artifacts || true
|
|
|
|
- name: Cleanup artifacts Win
|
|
|
|
if: matrix.os == 'windows-2016'
|
|
|
|
run: |
|
|
|
|
mkdir artifacts
|
|
|
|
mv app/dist/*.exe artifacts
|
|
|
|
|
2020-03-15 20:10:38 +00:00
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.os }}
|
2020-03-15 19:42:29 +00:00
|
|
|
path: artifacts
|
2020-03-15 20:10:38 +00:00
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
2020-03-15 19:42:29 +00:00
|
|
|
files: "artifacts/**"
|
2020-03-15 20:10:38 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|