Skip to content

Commit

Permalink
chore: workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cheng zhen committed Oct 11, 2024
1 parent d43b9d7 commit 84edd8f
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,28 @@ jobs:
npm ci
npm run postinstall
- name: Build
run: npm run build

- name: Run tests
run: npm test
- name: Typecheck
run: npm run typecheck

- name: Lint
run: npm run lint

- name: Build
run: npm run build

# 移除了测试步骤,因为 package.json 中没有定义测试脚本

- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
github_token: ${{ secrets.token }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
GH_TOKEN: ${{ secrets.token }}
run: |
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
npm run build:win
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
npm run build:mac
else
npm run build:linux
fi
- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 84edd8f

Please sign in to comment.