forked from FaisalUmair/udemy-downloader-gui
-
-
Notifications
You must be signed in to change notification settings - Fork 209
76 lines (61 loc) · 1.94 KB
/
publish.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
name: Publish
on:
push:
tags: ["*"]
jobs:
publish:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: create env file
run: |
touch .env
echo SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> .env
- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json')}}
# - name: Install Node.js, NPM and Yarn
# uses: actions/setup-node@v3
# with:
# node-version: '>=16.8.0'
- name: apt-update
if: startsWith(matrix.os, 'ubuntu-latest')
run: sudo apt-get update
- name: autoremove
if: startsWith(matrix.os, 'ubuntu-latest')
run: sudo apt autoremove
- name: Install libarchive rpm on Linux
if: startsWith(matrix.os, 'ubuntu-latest')
run: sudo apt-get install libarchive-tools rpm
- name: Install dmg-license fo MacOS
if: startsWith(matrix.os, 'macos-latest')
run: npm install dmg-license
- name: Build Electron App
uses: heliomarpm/action-electron-builder@2.1
with:
max_attempts: 3
github_token: ${{ secrets.github_token }}
release: true
- name: Build Electron App Win32
if: startsWith(matrix.os, 'windows-latest')
uses: heliomarpm/action-electron-builder@2.1
with:
args: --ia32
max_attempts: 3
github_token: ${{ secrets.github_token }}
release: true
- name: see directory
if: startsWith(matrix.os, 'windows-latest') == false
run: ls ./dist
- name: see directory
if: startsWith(matrix.os, 'windows-latest')
run: dir dist