Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit 6f14797

Browse files
authored
Create main.yml
1 parent 99fccac commit 6f14797

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/main.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
publish:
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
matrix:
14+
os: [ macos-latest ]
15+
16+
steps:
17+
- name: Checkout git repo
18+
uses: actions/checkout@v1
19+
20+
- name: Install Node, NPM and Yarn
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: 15
24+
25+
- name: Get yarn cache directory path
26+
id: yarn-cache-dir-path
27+
run: echo "::set-output name=dir::$(yarn cache dir)"
28+
29+
- uses: actions/cache@v1
30+
id: yarn-cache
31+
with:
32+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
33+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-yarn-
36+
- name: Install dependencies
37+
run: |
38+
yarn install --prefer-offline
39+
- name: Install dependencies
40+
run: |
41+
yarn install
42+
- name: Publish releases
43+
env:
44+
# These values are used for auto updates signing
45+
APPLE_ID: ${{ secrets.APPLE_ID }}
46+
APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }}
47+
CSC_LINK: ${{ secrets.CSC_LINK }}
48+
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
49+
# This is used for uploading release assets to github
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
run: |
52+
yarn postinstall && yarn build && yarn electron-builder --publish always --win --mac --linux

0 commit comments

Comments
 (0)