-
Notifications
You must be signed in to change notification settings - Fork 5
107 lines (87 loc) · 3.32 KB
/
Copy pathpc-installer-release.yml
File metadata and controls
107 lines (87 loc) · 3.32 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Build PC Installer
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: cd pc-installer && npm ci
- name: Create self-signed certificate for MSIX
shell: pwsh
run: |
$pfxPath = "$env:USERPROFILE\FulaNodeDevCert.pfx"
$cert = New-SelfSignedCertificate -Type Custom `
-Subject "CN=E9FEC2DC-DBBE-45BA-A112-26EFEA253DB5" `
-KeyUsage DigitalSignature -FriendlyName "FulaNodeDevCert" `
-CertStoreLocation "Cert:\CurrentUser\My" `
-TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")
Export-PfxCertificate -Cert "Cert:\CurrentUser\My\$($cert.Thumbprint)" `
-FilePath $pfxPath -Password (New-Object System.Security.SecureString)
Write-Output "MSIX_DEV_CERT=$pfxPath" >> $env:GITHUB_ENV
Write-Output "Certificate exported to $pfxPath"
- name: Exclude build dir from Windows Defender
shell: pwsh
run: |
Add-MpPreference -ExclusionPath "$env:GITHUB_WORKSPACE\pc-installer\out"
- name: Build installer
run: cd pc-installer && npm run make
- name: Upload Windows EXE installer
uses: actions/upload-artifact@v4
with:
name: windows-installer-exe
path: pc-installer/out/make/squirrel.windows/x64/*.exe
- name: Upload Windows MSIX package
uses: actions/upload-artifact@v4
with:
name: windows-installer-msix
path: |
pc-installer/out/make/appx/x64/*.appx
pc-installer/out/make/appx/x64/*.msix
retention-days: 7
- name: Rename EXE for release
if: github.event_name == 'release'
shell: pwsh
run: |
$exe = Get-ChildItem -Path pc-installer/out/make/squirrel.windows/x64/*.exe | Select-Object -First 1
Copy-Item $exe.FullName "pc-installer/out/make/squirrel.windows/x64/Fula.Node.Setup.exe"
- name: Upload to GitHub Release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: pc-installer/out/make/squirrel.windows/x64/Fula.Node.Setup.exe
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: cd pc-installer && npm ci
- name: Build installer
run: cd pc-installer && npm run make
- name: Upload Linux installer
uses: actions/upload-artifact@v4
with:
name: linux-installer
path: pc-installer/out/make/deb/x64/*.deb
- name: Rename DEB for release
if: github.event_name == 'release'
run: |
cp pc-installer/out/make/deb/x64/*.deb pc-installer/out/make/deb/x64/fula-node_amd64.deb
- name: Upload to GitHub Release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: pc-installer/out/make/deb/x64/fula-node_amd64.deb