Skip to content

Release v1.1.1 — Intel macOS dmg + remove broken autobuild stub #28

Release v1.1.1 — Intel macOS dmg + remove broken autobuild stub

Release v1.1.1 — Intel macOS dmg + remove broken autobuild stub #28

Workflow file for this run

name: Build & Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g. v1.0.6)'
required: true
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.get-tag.outputs.tag }}
steps:
- uses: actions/checkout@v4
- name: Get tag
id: get-tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
else
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
fi
- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.get-tag.outputs.tag }}
draft: false
generate_release_notes: true
build-windows:
needs: create-release
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.create-release.outputs.tag }}
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Download Inter font
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path assets/fonts | Out-Null
Invoke-WebRequest -Uri "https://github.com/rsms/inter/releases/download/v4.0/Inter-4.0.zip" -OutFile inter.zip
Expand-Archive -Path inter.zip -DestinationPath inter-tmp -Force
$woff2 = Get-ChildItem -Path inter-tmp -Recurse -Filter "Inter.woff2" | Select-Object -First 1
if (-not $woff2) { $woff2 = Get-ChildItem -Path inter-tmp -Recurse -Filter "*.woff2" | Where-Object { $_.Name -notlike "*Italic*" } | Select-Object -First 1 }
Copy-Item $woff2.FullName -Destination assets/fonts/inter.woff2
Remove-Item inter.zip, inter-tmp -Recurse -Force
Write-Host "Inter font bundled"
- run: npm ci
- name: Build Windows portable
run: npx electron-builder --win portable --publish never
- name: Sign exe (self-signed)
shell: pwsh
continue-on-error: true
run: |
$cert = New-SelfSignedCertificate `
-Subject "CN=PS4 Vault, O=NookieAI, C=US" `
-Type CodeSigning `
-CertStoreLocation Cert:\CurrentUser\My `
-HashAlgorithm SHA256 `
-NotAfter (Get-Date).AddYears(3)
$pwd = ConvertTo-SecureString -String "ps4vault_sign" -Force -AsPlainText
Export-PfxCertificate -Cert $cert -FilePath sign.pfx -Password $pwd | Out-Null
$exe = Get-ChildItem dist -Filter "*.exe" | Select-Object -First 1
$signtool = Get-ChildItem "C:\Program Files (x86)\Windows Kits" -Recurse -Filter "signtool.exe" -ErrorAction SilentlyContinue | Select-Object -First 1
if ($signtool) {
& $signtool.FullName sign /fd SHA256 /f sign.pfx /p ps4vault_sign /t http://timestamp.digicert.com $exe.FullName
Write-Host "Signed: $($exe.Name)"
} else {
Write-Host "signtool not found - skipping signing"
}
Remove-Item sign.pfx -Force -ErrorAction SilentlyContinue
- name: Rename to PS4 Vault.exe
shell: pwsh
run: |
$file = Get-ChildItem dist -Filter "*.exe" | Select-Object -First 1
Rename-Item $file.FullName "PS4 Vault.exe"
- name: Upload Windows portable
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.create-release.outputs.tag }}
files: dist/PS4 Vault.exe
build-mac:
needs: create-release
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.create-release.outputs.tag }}
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Download Inter font
run: |
mkdir -p assets/fonts
curl -L "https://github.com/rsms/inter/releases/download/v4.0/Inter-4.0.zip" -o inter.zip
unzip -o inter.zip -d inter-tmp
woff2=$(find inter-tmp -name "Inter.woff2" | head -1)
if [ -z "$woff2" ]; then
woff2=$(find inter-tmp -name "*.woff2" | grep -iv italic | head -1)
fi
cp "$woff2" assets/fonts/inter.woff2
rm -rf inter.zip inter-tmp
- run: npm ci
- name: Build Mac
run: npx electron-builder --mac --publish never
- name: Upload Mac DMG
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.create-release.outputs.tag }}
files: dist/**/*.dmg
build-mac-x64:
needs: create-release
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.create-release.outputs.tag }}
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Download Inter font
run: |
mkdir -p assets/fonts
curl -L "https://github.com/rsms/inter/releases/download/v4.0/Inter-4.0.zip" -o inter.zip
unzip -o inter.zip -d inter-tmp
woff2=$(find inter-tmp -name "Inter.woff2" | head -1)
if [ -z "$woff2" ]; then
woff2=$(find inter-tmp -name "*.woff2" | grep -iv italic | head -1)
fi
cp "$woff2" assets/fonts/inter.woff2
rm -rf inter.zip inter-tmp
- run: npm ci
- name: Build Mac (Intel x64)
run: npx electron-builder --mac --x64 --publish never
- name: Upload Mac x64 DMG
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.create-release.outputs.tag }}
files: dist/**/*.dmg
build-linux:
needs: create-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.create-release.outputs.tag }}
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Linux build deps
run: sudo apt-get install -y rpm fakeroot
- name: Remove ico so electron-builder uses icon.png
run: rm -f assets/icon.ico assets/icon.icns
- name: Download Inter font
run: |
mkdir -p assets/fonts
curl -L "https://github.com/rsms/inter/releases/download/v4.0/Inter-4.0.zip" -o inter.zip
unzip -o inter.zip -d inter-tmp
woff2=$(find inter-tmp -name "Inter.woff2" | head -1)
if [ -z "$woff2" ]; then
woff2=$(find inter-tmp -name "*.woff2" | grep -iv italic | head -1)
fi
cp "$woff2" assets/fonts/inter.woff2
rm -rf inter.zip inter-tmp
- run: npm ci
- name: Build Linux
run: npx electron-builder --linux --publish never
- name: Upload Linux AppImage
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.create-release.outputs.tag }}
files: dist/**/*.AppImage