Update electron.yml
This commit is contained in:
parent
fea5f32f99
commit
3b07b3ab5b
61
.github/workflows/electron.yml
vendored
61
.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
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
node-version: 10
|
||||||
- name: Use Node.js 10.x
|
|
||||||
uses: actions/setup-node@v1
|
- name: Build/release Electron app
|
||||||
with:
|
uses: samuelmeuli/action-electron-builder@v1
|
||||||
node-version: 10.x
|
with:
|
||||||
- name: yarn install
|
# GitHub token, automatically provided to the action
|
||||||
run: |
|
# (No need to define this secret in the repo settings)
|
||||||
yarn install
|
github_token: ${{ secrets.github_token }}
|
||||||
- name: Publish
|
|
||||||
run: |
|
# If the commit is tagged with a version (e.g. "v1.0.0"),
|
||||||
yarn run dist
|
# release the app after building
|
||||||
- name: Cleanup artifacts
|
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
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}}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user