forked from TurboWarp/desktop
-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (74 loc) · 2.6 KB
/
Copy pathrelease.yml
File metadata and controls
84 lines (74 loc) · 2.6 KB
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
78
79
80
81
82
83
84
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 14.x
cache: npm
- name: Install Dependencies
run: npm i
- name: OOf
run: npm run fetch
- name: Compile
run: npm run compile
env:
NODE_OPTIONS: --max-old-space-size=4096
TW_ENABLE_UPDATE_CHECKER: "1"
- name: Package Windows
if: runner.os == 'Windows'
run: |
npx electron-builder --windows nsis --x64 --publish always
npx electron-builder --windows nsis --ia32 --publish always
npx electron-builder --windows nsis --arm64 --publish always
npx electron-builder --windows portable --x64 --publish always
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Package Microsoft Store
# Microsoft Store artifact needs to completely recompile the JS since we don't want the update checker
if: runner.os == 'Windows'
run: npm run dist -- --windows appx --x64 --ia32 --arm64 --publish never
env:
NODE_OPTIONS: --max-old-space-size=4096
- name: Upload Microsoft Store Artifact
if: runner.os == 'Windows'
uses: actions/upload-artifact@v2
with:
name: appx
path: dist/*.appx
- name: Package macOS
if: runner.os == 'macOS'
run: |
npx electron-builder --mac dmg --universal --publish always
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
CSC_LINK: ${{ secrets.CSC_LINK }}
- name: Package Linux
if: runner.os == 'Linux'
run: |
npx electron-builder --linux deb --x64 --publish always
npx electron-builder --linux deb --arm64 --publish always
npx electron-builder --linux deb --armv7l --publish always
npx electron-builder --linux tar.gz --x64 --publish always
npx electron-builder --linux tar.gz --arm64 --publish always
npx electron-builder --linux tar.gz --armv7l --publish always
npx electron-builder --linux AppImage --x64 --publish always
npx electron-builder --linux AppImage --arm64 --publish always
npx electron-builder --linux AppImage --armv7l --publish always
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}