Skip to content

Commit ccd6250

Browse files
authored
Merge pull request #1 from Jai-JAP/patch-2
Patch 2
2 parents cf8b3ea + e291e00 commit ccd6250

File tree

3 files changed

+134
-27
lines changed

3 files changed

+134
-27
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
node-version: [14.x]
15-
runtime: [ linux-x64, linux-armv7l, linux-arm64, win-x64, osx-x64 ]
15+
runtime: [ linux-x64, linux-armv7l, linux-arm64, win-x64, win-arm64, osx-x64, osx-arm64 ]
1616
include:
1717
- runtime: linux-x64
1818
os: ubuntu-latest
@@ -26,9 +26,15 @@ jobs:
2626
- runtime: osx-x64
2727
os: macOS-latest
2828

29+
- runtime: osx-arm64
30+
os: macOS-latest
31+
2932
- runtime: win-x64
3033
os: windows-latest
3134

35+
- runtime: win-arm64
36+
os: windows-latest
37+
3238
runs-on: ${{ matrix.os }}
3339

3440
steps:
@@ -76,7 +82,7 @@ jobs:
7682

7783

7884
- name: Install libarchive-tools
79-
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64')
85+
if: startsWith(matrix.os, 'ubuntu')
8086
run: sudo apt -y install libarchive-tools; echo "Version Number ${{ toJson(job) }} ${{ toJson(needs) }}"
8187

8288
- name: Build x64 with Node.js ${{ matrix.node-version}}
@@ -88,7 +94,7 @@ jobs:
8894
run: npm run build:arm32 --if-present
8995

9096
- name: Build ARM64 with Node.js ${{ matrix.node-version}}
91-
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64')
97+
if: contains(matrix.runtime, 'arm64')
9298
run: npm run build:arm64 --if-present
9399

94100
- name: Upload Linux .zip x64 Artifact
@@ -205,30 +211,58 @@ jobs:
205211
# name: freetube_${{ steps.versionNumber.outputs.result }}_static_web
206212
# path: dist/web
207213

208-
- name: Upload Windows .exe Artifact
214+
- name: Upload Windows x64 .exe Artifact
215+
uses: actions/upload-artifact@v2
216+
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64')
217+
with:
218+
name: freetube-${{ steps.versionNumber.outputs.result }}-setup-x64.exe
219+
path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe
220+
221+
- name: Upload Windows arm64 .exe Artifact
222+
uses: actions/upload-artifact@v2
223+
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64')
224+
with:
225+
name: freetube-${{ steps.versionNumber.outputs.result }}-setup-arm64.exe
226+
path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe
227+
228+
- name: Upload Windows x64 .zip Artifact
209229
uses: actions/upload-artifact@v2
210-
if: startsWith(matrix.os, 'windows')
230+
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64')
211231
with:
212232
name: freetube-${{ steps.versionNumber.outputs.result }}-win-x64-portable
213233
path: build/freetube-${{ steps.versionNumber.outputs.result }}-win.zip
214234

215-
- name: Upload Windows .zip Artifact
235+
- name: Upload Windows arm64 .zip Artifact
216236
uses: actions/upload-artifact@v2
217-
if: startsWith(matrix.os, 'windows')
237+
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64')
218238
with:
219-
name: freetube-${{ steps.versionNumber.outputs.result }}-setup-x64.exe
220-
path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe
221-
222-
- name: Upload Windows Portable Artifact
239+
name: freetube-${{ steps.versionNumber.outputs.result }}-win-arm64-portable
240+
path: build/freetube-${{ steps.versionNumber.outputs.result }}-win.zip
241+
242+
- name: Upload Windows x64 Portable Artifact
223243
uses: actions/upload-artifact@v2
224-
if: startsWith(matrix.os, 'windows')
244+
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64')
225245
with:
226246
name: freetube-${{ steps.versionNumber.outputs.result }}-portable-x64.exe
227247
path: build/freetube ${{ steps.versionNumber.outputs.result }}.exe
228248

229-
- name: Upload Mac .dmg Artifact
249+
- name: Upload Windows arm64 Portable Artifact
250+
uses: actions/upload-artifact@v2
251+
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64')
252+
with:
253+
name: freetube-${{ steps.versionNumber.outputs.result }}-portable-arm64.exe
254+
path: build/freetube ${{ steps.versionNumber.outputs.result }}.exe
255+
256+
- name: Upload Mac x64 .dmg Artifact
257+
uses: actions/upload-artifact@v2
258+
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64')
259+
with:
260+
name: freetube-${{ steps.versionNumber.outputs.result }}-mac-x64.dmg
261+
path: build/freetube-${{ steps.versionNumber.outputs.result }}.dmg
262+
263+
- name: Upload Mac arm64 .dmg Artifact
230264
uses: actions/upload-artifact@v2
231-
if: startsWith(matrix.os, 'macos')
265+
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64')
232266
with:
233-
name: freetube-${{ steps.versionNumber.outputs.result }}-mac.dmg
267+
name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.dmg
234268
path: build/freetube-${{ steps.versionNumber.outputs.result }}.dmg

.github/workflows/release.yml

Lines changed: 71 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
node-version: [14.x]
16-
runtime: [ linux-x64, linux-armv7l, linux-arm64, win-x64, osx-x64 ]
16+
runtime: [ linux-x64, linux-armv7l, linux-arm64, win-x64, win-arm64, osx-x64, osx-arm64 ]
1717
include:
1818
- runtime: linux-x64
1919
os: ubuntu-latest
@@ -26,9 +26,15 @@ jobs:
2626

2727
- runtime: osx-x64
2828
os: macOS-latest
29-
29+
30+
- runtime: osx-arm64
31+
os: macOS-latest
32+
3033
- runtime: win-x64
3134
os: windows-latest
35+
36+
- runtime: win-arm64
37+
os: windows-latest
3238

3339
runs-on: ${{ matrix.os }}
3440

@@ -57,7 +63,7 @@ jobs:
5763
run: npm run build:arm32 --if-present
5864

5965
- name: Build ARM64 with Node.js ${{ matrix.node-version}}
60-
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64')
66+
if: contains(matrix.runtime, 'arm64')
6167
run: npm run build:arm64 --if-present
6268

6369
- name: Upload AppImage x64 Release
@@ -161,9 +167,9 @@ jobs:
161167
asset_path: build/freetube-${{ env.PACKAGE_VERSION }}.aarch64.rpm
162168
asset_content_type: application/x-rpm
163169

164-
- name: Upload Windows .exe Release
170+
- name: Upload Windows x64 .exe Release
165171
uses: actions/upload-release-asset@v1
166-
if: startsWith(matrix.os, 'windows')
172+
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64')
167173
env:
168174
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
169175
with:
@@ -172,9 +178,20 @@ jobs:
172178
asset_path: build/freetube Setup ${{ env.PACKAGE_VERSION }}.exe
173179
asset_content_type: application/x-ms-dos-executable
174180

175-
- name: Upload Windows .zip Release
181+
- name: Upload Windows arm64 .exe Release
176182
uses: actions/upload-release-asset@v1
177-
if: startsWith(matrix.os, 'windows')
183+
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64')
184+
env:
185+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
186+
with:
187+
upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label}
188+
asset_name: freetube-${{ env.PACKAGE_VERSION }}-setup-arm64.exe
189+
asset_path: build/freetube Setup ${{ env.PACKAGE_VERSION }}.exe
190+
asset_content_type: application/x-ms-dos-executable
191+
192+
- name: Upload Windows x64 .zip Release
193+
uses: actions/upload-release-asset@v1
194+
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64')
178195
env:
179196
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
180197
with:
@@ -183,13 +200,57 @@ jobs:
183200
asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-win.zip
184201
asset_content_type: application/zip
185202

186-
- name: Upload Mac .dmg Release
203+
- name: Upload Windows arm64 .zip Release
204+
uses: actions/upload-release-asset@v1
205+
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64')
206+
env:
207+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
208+
with:
209+
upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label}
210+
asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-arm64-portable.zip
211+
asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-win.zip
212+
asset_content_type: application/zip
213+
214+
- name: Upload Windows x64 portable Release
215+
uses: actions/upload-release-asset@v1
216+
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64')
217+
env:
218+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
219+
with:
220+
upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label}
221+
asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-x64-portable.exe
222+
asset_path: build/FreeTube ${{ env.PACKAGE_VERSION }}.exe
223+
asset_content_type: application/x-ms-dos-executable
224+
225+
- name: Upload Windows arm64 portable Release
226+
uses: actions/upload-release-asset@v1
227+
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64')
228+
env:
229+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
230+
with:
231+
upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label}
232+
asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-arm64-portable.exe
233+
asset_path: build/FreeTube ${{ env.PACKAGE_VERSION }}.exe
234+
asset_content_type: application/x-ms-dos-executable
235+
236+
- name: Upload Mac x64 .dmg Release
237+
uses: actions/upload-release-asset@v1
238+
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64')
239+
env:
240+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
241+
with:
242+
upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label}
243+
asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-x64.dmg
244+
asset_path: build/freetube-${{ env.PACKAGE_VERSION }}.dmg
245+
asset_content_type: application/x-apple-diskimage
246+
247+
- name: Upload Mac arm64 .dmg Release
187248
uses: actions/upload-release-asset@v1
188-
if: startsWith(matrix.os, 'macos')
249+
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64')
189250
env:
190251
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
191252
with:
192253
upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label}
193-
asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac.dmg
254+
asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-arm64.dmg
194255
asset_path: build/freetube-${{ env.PACKAGE_VERSION }}.dmg
195256
asset_content_type: application/x-apple-diskimage

_scripts/build.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,21 @@ let targets
1010
var platform = os.platform()
1111

1212
if (platform == 'darwin') {
13-
targets = Platform.MAC.createTarget()
13+
let arch = Arch.x64
14+
15+
if (args[2] === 'arm64') {
16+
arch = Arch.arm64
17+
}
18+
19+
targets = Platform.MAC.createTarget(['DMG','zip'], arch)
1420
} else if (platform == 'win32') {
15-
targets = Platform.WINDOWS.createTarget()
21+
let arch = Arch.x64
22+
23+
if (args[2] === 'arm64') {
24+
arch = Arch.arm64
25+
}
26+
27+
targets = Platform.WINDOWS.createTarget(['nsis', 'zip', 'portable', 'squirrel'], arch)
1628
} else if (platform == 'linux') {
1729
let arch = Arch.x64
1830

0 commit comments

Comments
 (0)