Skip to content

Commit

Permalink
feat: Unpack the app to app.asar for test mode. (#2933)
Browse files Browse the repository at this point in the history
feat: For test not package app dir
  • Loading branch information
yanguoyu authored Dec 19, 2023
1 parent 6640e21 commit 1402f8b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/package_for_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ jobs:
env:
CI: false

- name: Write electron-build Test yml
uses: actions/github-script@v6
with:
script: |
const fs = require('node:fs')
const ympPath = 'packages/neuron-wallet/electron-builder.yml'
fs.writeFileSync(ympPath, fs.readFileSync(ympPath).toString().replace('asar: true', 'asar: false'))
- name: Package for MacOS
if: ${{ matrix.os == 'macos-latest' && env.MAC_SHOULD_CODE_SIGN == 'true' }}
run: |
Expand All @@ -122,6 +130,7 @@ jobs:
CSC_LINK: ${{ secrets.MAC_CERTIFICATE_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
TEAM_ID: ${{ secrets.TEAM_ID }}
USE_HARD_LINKS: false

- name: Package for MacOS for skip code sign
if: ${{ matrix.os == 'macos-latest' && env.MAC_SHOULD_CODE_SIGN == 'false' }}
Expand All @@ -132,6 +141,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_NOTARIZE: true
USE_HARD_LINKS: false

- name: Package for Windows
if: matrix.os == 'windows-2019'
Expand All @@ -150,6 +160,7 @@ jobs:
yarn package:test linux
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_HARD_LINKS: false

- name: Upload Neuron App Zip
if: matrix.os == 'macos-latest'
Expand Down
1 change: 1 addition & 0 deletions packages/neuron-wallet/electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ appId: com.nervos.neuron
copyright: Copyright (C) 2019-2023 Nervos Foundation.
productName: Neuron

# This property will replace to false in package for test action
asar: true

directories:
Expand Down

2 comments on commit 1402f8b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 7259463437

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 7259464864

Please sign in to comment.