Skip to content

fix: Disable code signing for builds #563

fix: Disable code signing for builds

fix: Disable code signing for builds #563

name: Build & Release Electron App
on:
push:
branches:
- master
- release-candidate
- release-candidate-*
- release-*
- feature-*
workflow_dispatch:
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-14, ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
# - name: Clear Yarn Cache (Unix)
# if: runner.os != 'Windows'
# run: |
# rm -rf .yarn/cache || true
# echo "Cleared Yarn cache"
# shell: bash
# - name: Clear Yarn Cache (Windows)
# if: runner.os == 'Windows'
# run: |
# Remove-Item -Path .yarn/cache -Recurse -Force -ErrorAction SilentlyContinue
# echo "Cleared Yarn cache"
# shell: pwsh
- name: Restore Cached Electron Bundles
id: restore-cache
uses: actions/cache@v4
with:
path: |
~/.cache/electron
~/Library/Caches/electron
~/AppData/Local/electron/Cache
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}
- name: Yarn Install
run: yarn install
- name: Yarn Build
run: yarn build
- name: Upload Built App
uses: actions/upload-artifact@v4
with:
name: app-build-dir-${{ runner.os }}
path: packages/keepkey-desktop/build/
if-no-files-found: error
- name: Generate Checksum
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
./scripts/generate_checksum_windows.sh
else
./scripts/generate_checksum_unix.sh
fi
shell: bash
- name: Upload Checksum
uses: actions/upload-artifact@v4
with:
name: checksum-${{ runner.os }}
path: checksum.txt
if-no-files-found: error
- name: Linux - Build Electron App (All Platforms)
if: startsWith(matrix.os, 'ubuntu')
run: |
# Build for Linux
yarn run release
# Also build Windows packages from Linux (cross-platform)
cd packages/keepkey-desktop
yarn electron-builder --win --publish=never
env:
NODE_ENV: production
GH_TOKEN: ${{ secrets.github_token }}
- name: Mac - Build Electron App
if: startsWith(matrix.os, 'macos')
run: |
yarn run release
# Copy the file with 'universal' in its name to a new version without 'universal'
for file in packages/keepkey-desktop/dist/*-universal.dmg; do
[ -f "$file" ] && cp "$file" "${file/-universal/}"
done
for file in packages/keepkey-desktop/dist/*-universal.dmg.blockmap; do
[ -f "$file" ] && cp "$file" "${file/-universal/}"
done
for file in packages/keepkey-desktop/dist/*-universal.zip; do
[ -f "$file" ] && cp "$file" "${file/-universal/}"
done
env:
NODE_ENV: production
GH_TOKEN: ${{ secrets.github_token }}
CSC_IDENTITY_AUTO_DISCOVERY: false
- name: Windows - Build Electron App
if: startsWith(matrix.os, 'windows')
run: |
yarn run release
cp "packages/keepkey-desktop/dist/KeepKey-Desktop-*-*-arm64.dmg" "packages/keepkey-desktop/dist/KeepKey-Desktop-latest.dmg"
env:
NODE_ENV: production
GH_TOKEN: ${{ secrets.github_token }}
- name: Windows - Upload .exe
if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v4
with:
name: windows-nsis-${{ matrix.os }}
path: |
packages/keepkey-desktop/dist/*.exe
packages/keepkey-desktop/dist/*.exe.blockmap
if-no-files-found: error
- name: Upload Windows msi
if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v4
with:
name: windows-msi-${{ matrix.os }}
path: |
packages/keepkey-desktop/dist/*.msi
packages/keepkey-desktop/dist/*.msi.blockmap
if-no-files-found: warn
- name: Linux - Upload .AppImage
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v4
with:
name: linux-AppImage-${{ matrix.os }}
path: |
packages/keepkey-desktop/dist/*.AppImage
packages/keepkey-desktop/dist/*.AppImage.blockmap
if-no-files-found: error
- name: Linux - Upload Windows packages (cross-platform build)
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v4
with:
name: windows-from-linux-${{ matrix.os }}
path: |
packages/keepkey-desktop/dist/*.exe
packages/keepkey-desktop/dist/*.msi
packages/keepkey-desktop/dist/*.exe.blockmap
packages/keepkey-desktop/dist/*.msi.blockmap
if-no-files-found: warn
- name: Mac - Upload .dmg
if: startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@v4
with:
name: mac-dmg-${{ matrix.os }}
path: |
packages/keepkey-desktop/dist/*.dmg
packages/keepkey-desktop/dist/*.dmg.blockmap
if-no-files-found: error