-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (79 loc) · 2.62 KB
/
build.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
78
79
80
81
82
83
name: Build
on: workflow_dispatch
jobs:
build-win-x64:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- run: npm install
- name: Get Version
id: get-version
run: node -p -e "'VERSION='+require('./package.json').version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- name: Build Windows
run: npm run build
- name: Package Windows
run: npm run pack-win
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Artifact - Windows
uses: actions/upload-artifact@v4
env:
APP_VERSION: ${{ steps.get-version.outputs.VERSION }}
with:
name: m3u8downloader-v${{ env.APP_VERSION }}-win32-x64.zip
path: release/m3u8downloader-v${{ env.APP_VERSION }}-win32-x64.zip
build-mac-x64:
# macos-12 is the last to be compatible with macbook pro 2015
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- run: npm install
- name: Get Version
id: get-version
run: node -p -e "'VERSION='+require('./package.json').version" >> "$GITHUB_OUTPUT"
- name: Build MacOS
run: npm run build
- name: Package MacOS
run: npm run pack-mac
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Artifact - MacOS
uses: actions/upload-artifact@v4
env:
APP_VERSION: ${{ steps.get-version.outputs.VERSION }}
with:
name: m3u8downloader-v${{ env.APP_VERSION }}-darwin-x64.dmg
path: release/m3u8downloader-v${{ env.APP_VERSION }}-darwin-x64.dmg
build-linux-x64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- run: npm install
- name: Get Version
id: get-version
run: node -p -e "'VERSION='+require('./package.json').version" >> "$GITHUB_OUTPUT"
- name: Build Linux
run: npm run build
- name: Package Linux
run: npm run pack-linux
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Artifact - Linux
uses: actions/upload-artifact@v4
env:
APP_VERSION: ${{ steps.get-version.outputs.VERSION }}
with:
name: m3u8downloader-v${{ env.APP_VERSION }}-linux-x64.tar.gz
path: release/m3u8downloader-v${{ env.APP_VERSION }}-linux-x64.tar.gz