Skip to content

Commit

Permalink
sync release-candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
BitHighlander committed Feb 12, 2025
2 parents 13f960e + 95a94d5 commit f244e27
Show file tree
Hide file tree
Showing 219 changed files with 36,737 additions and 29,635 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/.yarn/cache/**/*.zip filter=lfs diff=lfs merge=lfs -text
/executables/* filter=lfs diff=lfs merge=lfs -text
executables/ollama-darwin filter=lfs diff=lfs merge=lfs -text
99 changes: 66 additions & 33 deletions .github/workflows/build-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-14, ubuntu-latest, windows-latest]
steps:
# Existing Steps
- name: Checkout
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: true

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: Restore Cached Electron Bundles
id: restore-cache
uses: actions/cache@v3
Expand All @@ -36,93 +37,125 @@ jobs:
~/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@v3
uses: actions/upload-artifact@v4
with:
name: app-build-dir-${{ runner.os }}
path: packages/keepkey-desktop/build/
if-no-files-found: error

# Additional Step for Generating Checksums
- name: Generate Checksum
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
./scripts/generate_checksum_windows.sh
./scripts/generate_checksum_windows.sh
else
./scripts/generate_checksum_unix.sh
./scripts/generate_checksum_unix.sh
fi
shell: bash
# Additional Step for Uploading Checksums

- name: Upload Checksum
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: checksum-${{ runner.os }}
path: checksum.txt
if-no-files-found: error

# Rest of the Steps
- name: Mac - Prepare For App Notarization
if: startsWith(matrix.os, 'macos')
run: |
mkdir -p ~/private_keys/
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8
# - name: Linux - Publish packages
# if: startsWith(matrix.os, 'ubuntu')
# run: yarn publish
# env:
# YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
ls -al ~/private_keys # Debugging line to check the contents of the directory
chmod -R 755 ~/private_keys # Ensure proper permissions
- name: Linux - Build Electron App
if: startsWith(matrix.os, 'ubuntu')
run: yarn run release
env:
NODE_ENV: production
APPLE_ID: ${{ secrets.apple_id }}
APPLE_ID_PASSWORD: ${{ secrets.apple_id_password }}
APPLE_TEAM_ID: ${{ secrets.apple_team_id }}
GH_TOKEN: ${{ secrets.github_token }}

- name: Mac - Build Electron App
if: startsWith(matrix.os, 'macos')
run: yarn run release
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_LINK: ${{ secrets.mac_certs }}
APPLE_API_KEY: ${{ secrets.apple_api_key }}
APPLE_API_KEY_ID: ${{ secrets.apple_api_key_id }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.apple_app_specific_password }}
APPLE_ID: ${{ secrets.apple_id }}
APPLE_ID_PASSWORD: ${{ secrets.apple_id_password }}
APPLE_TEAM_ID: ${{ secrets.apple_team_id }}
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
API_KEY_ID: ${{ secrets.api_key_id }}
API_KEY_ISSUER_ID: ${{ secrets.api_key_issuer_id }}

- name: Windows - Build Electron App
if: startsWith(matrix.os, 'windows')
run: yarn run release
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@v3
uses: actions/upload-artifact@v4
with:
name: linux-AppImage
name: linux-AppImage-${{ matrix.os }}
path: |
packages/keepkey-desktop/dist/*.AppImage
packages/keepkey-desktop/dist/*.AppImage.blockmap
if-no-files-found: error

- name: Mac - Upload .dmg
if: startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mac-dmg
name: mac-dmg-${{ matrix.os }}
path: |
packages/keepkey-desktop/dist/*.dmg
packages/keepkey-desktop/dist/*.dmg.blockmap
packages/keepkey-desktop/dist/*.zip
packages/keepkey-desktop/dist/*.zip.blockmap
if-no-files-found: error
- name: Windows - Upload .exe
if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v3
with:
name: windows-nsis
path: |
packages/keepkey-desktop/dist/*.exe
packages/keepkey-desktop/dist/*.exe.blockmap
if-no-files-found: error
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
!/.yarn/versions/**
!/.yarn/cache/
!/.yarn/cache/**
!/executables/**
!/firmware/**
!/packages/**
!/.editorconfig
Expand Down
Loading

0 comments on commit f244e27

Please sign in to comment.