Skip to content

Commit

Permalink
🔧 不再使用electron-builder官方的CI,改为action-gh-release
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd1434 committed Dec 24, 2021
1 parent 0a479b9 commit 756af60
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
os: [ macos-latest, windows-latest,linux-latest ]
os: [ macos-latest, windows-latest, ubuntu-latest ]

steps:
- uses: actions/checkout@v2
Expand Down
35 changes: 19 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build/release
name: Build/Release

on:
push:
Expand All @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
os: [ macos-latest, windows-latest ]
os: [ macos-latest, windows-latest, ubuntu-latest ]

steps:
- uses: actions/checkout@v2
Expand All @@ -21,25 +21,28 @@ jobs:
with:
node-version: '14.x'

- name: install dependencies
- name: Install dependencies
run: |
echo start install dependencies
yarn install --network-timeout 100000
- name: postinstall
- name: Build main and render
run: |
echo start postinstall
yarn postinstall
echo build main and render
yarn build
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
- name: Package electron app
run: |
echo Package Electron app
yarn release
- name: Upload app installer
uses: softprops/action-gh-release@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.TOKEN }}

# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
args: "--config electron_builder.json --publish always"
token: ${{ secrets.TOKEN }}
files: |
release/build/*.dmg
release/build/*.zip
release/build/*.exe
release/build/*.blockmap
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4016,10 +4016,10 @@ electron-to-chromium@^1.3.896:
resolved "https://registry.npmmirror.com/electron-to-chromium/download/electron-to-chromium-1.3.904.tgz#52a353994faeb0f2a9fab3606b4e0614d1af7b58"
integrity sha512-x5uZWXcVNYkTh4JubD7KSC1VMKz0vZwJUqVwY3ihsW0bst1BXDe494Uqbg3Y0fDGVjJqA8vEeGuvO5foyH2+qw==

electron@^15.3.1:
version "15.3.2"
resolved "https://registry.npmmirror.com/electron/download/electron-15.3.2.tgz#4f0cbad781d14e0194f5dfef1709e09a70c8074a"
integrity sha512-sEpOX10gjAyvq33HDxJrq2HhYZT3qndZjUrHkzG16QTLjykP7lMvGnJ/bt6wn+T75f4wwv59FUbQx2hW3Xz5TQ==
[email protected]:
version "15.3.1"
resolved "https://registry.npmjs.org/electron/-/electron-15.3.1.tgz#38ce9dfcd4ec51a33d62de23de15fb5ceeaea25d"
integrity sha512-6/qp3Dor7HSGq28qhJEVD1zBFZoWicmo3/ZLvo7rhXPPZFwEMSJGPMEZM9WYSfWW4t/OozpWNuuDe970cF7g2Q==
dependencies:
"@electron/get" "^1.13.0"
"@types/node" "^14.6.2"
Expand Down

0 comments on commit 756af60

Please sign in to comment.