Skip to content

Commit eeb192a

Browse files
committed
chore: update auto publish github action workflow
1 parent bda1943 commit eeb192a

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

.github/workflows/publish.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ on:
44
push:
55
branches:
66
- main
7+
tags:
8+
- "v*.*.*"
9+
workflow_dispatch:
710

811
jobs:
912
publish:
1013
# To enable auto publishing to github, update your electron publisher
1114
# config in package.json > "build" and remove the conditional below
12-
if: ${{ github.repository_owner == 'electron-react-boilerplate' }}
13-
1415
runs-on: ${{ matrix.os }}
1516

1617
strategy:
@@ -21,26 +22,29 @@ jobs:
2122
- name: Checkout git repo
2223
uses: actions/checkout@v3
2324

25+
- uses: pnpm/[email protected]
26+
with:
27+
version: latest
28+
2429
- name: Install Node and NPM
2530
uses: actions/setup-node@v3
2631
with:
2732
node-version: 16
28-
cache: npm
33+
cache: 'pnpm'
2934

3035
- name: Install and build
3136
run: |
32-
npm install
33-
npm run postinstall
34-
npm run build
37+
pnpm install
38+
pnpm run build
3539
3640
- name: Publish releases
3741
env:
38-
# These values are used for auto updates signing
39-
APPLE_ID: ${{ secrets.APPLE_ID }}
40-
APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }}
41-
CSC_LINK: ${{ secrets.CSC_LINK }}
42-
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
42+
# # These values are used for auto updates signing
43+
# APPLE_ID: ${{ secrets.APPLE_ID }}
44+
# APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }}
45+
# CSC_LINK: ${{ secrets.CSC_LINK }}
46+
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
4347
# This is used for uploading release assets to github
4448
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4549
run: |
46-
npm exec electron-builder -- --publish always --win --mac --linux
50+
pnpm electron-builder --publish always --win --mac --linux

0 commit comments

Comments
 (0)