debug sign #378
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Release Electron App | |
on: | |
push: | |
branches: | |
- master | |
- release-candidate | |
- release-candidate-* | |
- feature-* | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
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 | |
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@v3 | |
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@v3 | |
with: | |
name: checksum-${{ runner.os }} | |
path: checksum.txt | |
if-no-files-found: error | |
- name: Install or Update Xcode Command Line Tools | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
set -e | |
CLT_PLACEHOLDER="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress" | |
touch ${CLT_PLACEHOLDER} | |
PROD=$(softwareupdate -l | | |
grep "\*.*Command Line" | | |
head -n 1 | awk -F"*" '{print $2}' | | |
sed -e 's/^ *//' | | |
tr -d '\n') | |
softwareupdate -i "${PROD}" --verbose | |
rm ${CLT_PLACEHOLDER} | |
- name: Mac - Notarize the app with notarytool | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
xcrun notarytool submit path/to/your.app --keychain-profile "AC_NOTARY" --wait | |
xcrun stapler staple path/to/your.app | |
env: | |
AC_NOTARY: ${{ secrets.notarytool_profile }} | |
- name: Linux - Build Electron App | |
if: startsWith(matrix.os, 'ubuntu') | |
run: yarn run release | |
env: | |
NODE_ENV: production | |
GH_TOKEN: ${{ secrets.github_token }} | |
- name: Mac - Build Electron App | |
if: startsWith(matrix.os, 'macos') | |
run: yarn run release | |
env: | |
NODE_ENV: production | |
GH_TOKEN: ${{ secrets.github_token }} | |
CSC_LINK: ${{ secrets.mac_certs }} | |
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 | |
env: | |
NODE_ENV: production | |
GH_TOKEN: ${{ secrets.github_token }} | |
- name: Linux - Upload .AppImage | |
if: startsWith(matrix.os, 'ubuntu') | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-AppImage | |
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 | |
with: | |
name: mac-dmg | |
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 |