sandbox-clinic/.github/workflows/electron.yml

53 lines
1.4 KiB
YAML
Raw Normal View History

2020-02-13 13:30:37 +07:00
name: Sandbox Clinic Desktop
2020-02-13 12:42:46 +07:00
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
2020-02-13 13:08:50 +07:00
env:
2020-02-13 13:00:37 +07:00
GITHUB_CONTEXT: ${{ toJson(github) }}
2020-02-13 13:17:04 +07:00
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v1
2020-02-13 13:08:50 +07:00
with:
2020-02-13 13:00:37 +07:00
fetch-depth: 1
- name: Use Node.js 10.x
2020-02-13 13:08:50 +07:00
uses: actions/setup-node@v1
with:
2020-02-13 13:00:37 +07:00
node-version: 10.x
- name: yarn install
2020-02-13 13:08:50 +07:00
run: |
2020-02-13 13:00:37 +07:00
yarn install
- name: Publish
2020-02-13 13:08:50 +07:00
run: |
2020-02-13 13:00:37 +07:00
yarn run dist
- name: Cleanup artifacts
2020-02-13 13:08:50 +07:00
if: matrix.os != 'windows-latest'
run: |
2020-02-13 13:00:37 +07:00
mkdir artifacts
2020-02-13 13:41:03 +07:00
mv 'dist/(*.exe,*.deb,*.AppImage,*.dmg)' artifacts
2020-02-13 12:42:46 +07:00
- name: Cleanup artifacts Win
2020-02-13 13:08:50 +07:00
if: matrix.os == 'windows-latest'
run: |
2020-02-13 13:00:37 +07:00
mkdir artifacts
mv dist/*.exe artifacts
2020-02-13 12:42:46 +07:00
- name: Upload artifacts
2020-02-13 13:08:50 +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:08:50 +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:19:27 +07:00
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}