Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows Workflow #57

Merged
merged 7 commits into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions .github/workflows/win-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,50 @@ jobs:
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
$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
$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
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/