-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (57 loc) · 1.95 KB
/
win-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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Windows x64 Build
on:
release:
types: [created]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
node-version: [20]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Retrieve the secret and write it to a file
shell: pwsh
env:
SECRET_FILE: ${{ secrets.SECRET_FILE }}
run: |
$env:SECRET_FILE | Out-File .\src\secrets.json
dir .\src
- name: Retrieve the settings and write them to a file
shell: pwsh
env:
SETTINGS_FILE: ${{ secrets.SETTINGS_FILE }}
run: |
$env:SETTINGS_FILE | Out-File .\config\settings.json
dir .\config
- name: Generate certificate file from secret
shell: pwsh
env:
SETTINGS_FILE: ${{ secrets.CERT_WINDOWS }}
run: |
New-Item -ItemType Directory -Force -Path .\certs
$encodedBytes = [System.Convert]::FromBase64String("${{ secrets.CERT_WINDOWS }}");
Set-Content .\certs\installer.pfx -Value $encodedBytes -AsByteStream;
dir .\certs
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build Instakker
run: |
mkdir .\installer
npm install
npm run rebuild
npm run package-win64
npm run installer-win64
- uses: actions/upload-artifact@v4
with:
name: package
path: ./installer/win64/