-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (90 loc) · 2.82 KB
/
release.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
84
85
86
87
88
89
90
91
92
93
94
name: Release
on: workflow_dispatch
jobs:
build-win-x64:
runs-on: windows-2019
permissions:
contents: write
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 Release Artifact - Windows
uses: softprops/action-gh-release@v2
#if: startsWith(github.ref, 'refs/tags/')
env:
APP_VERSION: ${{ steps.get-version.outputs.VERSION }}
with:
tag_name: v${{ env.APP_VERSION }}
files: |
release/m3u8downloader-v${{ env.APP_VERSION }}-win32-x64.zip
build-mac-x64:
runs-on: macos-12
permissions:
contents: write
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 Release Artifact - MacOS
uses: softprops/action-gh-release@v2
#if: startsWith(github.ref, 'refs/tags/')
env:
APP_VERSION: ${{ steps.get-version.outputs.VERSION }}
with:
tag_name: v${{ env.APP_VERSION }}
files: |
release/m3u8downloader-v${{ env.APP_VERSION }}-darwin-x64.dmg
build-linux-x64:
runs-on: ubuntu-20.04
permissions:
contents: write
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 Release Artifact - Linux
uses: softprops/action-gh-release@v2
#if: startsWith(github.ref, 'refs/tags/')
env:
APP_VERSION: ${{ steps.get-version.outputs.VERSION }}
with:
tag_name: v${{ env.APP_VERSION }}
files: |
release/m3u8downloader-v${{ env.APP_VERSION }}-linux-x64.tar.gz