-
Notifications
You must be signed in to change notification settings - Fork 3
77 lines (67 loc) · 2 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Sobani-build
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
tags:
- v**
pull_request:
branches: [ master ]
release:
types:
- created
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
strategy:
matrix:
os:
- ubuntu-18.04
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Setup Node.js
- name: Setup Node.js for use with actions
uses: actions/[email protected]
# Install yarn and other dev dependencies
- name: Install yarn and dev dependencies
run: |
npm install -g yarn
yarn install --dev
# Build dist
- name: Build dist
run: yarn dist
- name: Prepare for uploading dist (linux)
if: matrix.os == 'ubuntu-18.04'
run: |
cd dist
rm -rf linux-unpacked || true
AppImage=`ls Sobani-*.AppImage`
DistFile=${AppImage%AppImage}-linux-x64.AppImage
mv $AppImage $DistFile
- name: Prepare for uploading dist (macOS)
if: matrix.os == 'macos-latest'
run: |
cd dist
rm -f latest-mac.yml || true
rm -f builder-effective-config.yaml || true
rm -rf mac || true
rm -f *.zip || true
DiskImage=`ls Sobani-*.dmg`
DistFile=${DiskImage%.dmg}-macos-x64.dmg
mv $DiskImage $DistFile
- name: Prepare for uploading dist (Windows)
if: matrix.os == 'windows-latest'
run: |
cd dist
rm -r -fo win-unpacked
- name: Upload artifact
uses: actions/[email protected]
with:
name: Sobani-${{ matrix.os }}
path: dist/