Skip to content

Commit

Permalink
ci: test build
Browse files Browse the repository at this point in the history
  • Loading branch information
gusye1234 committed Nov 26, 2023
1 parent 5047c96 commit e8d15ac
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 7 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Publish

on:
push:
branches:
- main
paths-ignore:
- "**/*.md"

jobs:
publish:
# To enable auto publishing to github, update your electron publisher
# config in package.json > "build" and remove the conditional below

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest]

steps:
- name: Checkout git repo
uses: actions/checkout@v3

- name: Install Node and NPM
uses: actions/setup-node@v3
with:
node-version: 18
# cache: pnpm

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install and build
run: |
pnpm install
pnpm build
- name: Publish releases
env:
# These values are used for auto updates signing
# APPLE_ID: ${{ secrets.APPLE_ID }}
# APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASS }}
# CSC_LINK: ${{ secrets.CSC_LINK }}
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
# This is used for uploading release assets to github
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm exec electron-builder -- --publish always --mac
Binary file modified assets/icon.ico
Binary file not shown.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
},
"build": {
"productName": "ChatSpot",
"appId": "org.erb.ElectronReact",
"appId": "org.erb.ChatSpot",
"asar": true,
"asarUnpack": "**\\*.{node,dll}",
"files": [
Expand Down Expand Up @@ -238,8 +238,8 @@
],
"publish": {
"provider": "github",
"owner": "electron-react-boilerplate",
"repo": "electron-react-boilerplate"
"owner": "gusye1234",
"repo": "chat-spot"
}
},
"devEngines": {
Expand Down
8 changes: 4 additions & 4 deletions release/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e8d15ac

Please sign in to comment.