Skip to content

Commit

Permalink
2
Browse files Browse the repository at this point in the history
  • Loading branch information
027xiguapi committed Apr 8, 2024
1 parent 54e3e75 commit 0994142
Showing 1 changed file with 33 additions and 35 deletions.
68 changes: 33 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,44 @@ name: Build
tags:
- v*
jobs:
release:
build:
name: build and release electron app
runs-on: '${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
os:
- windows-latest
- macos-latest
- ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install Pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: pnpm install
- name: Build Electron App
run: 'pnpm run build:desktop'
env:
GITHUB_TOKEN: '${{ secrets.ACCESS_TOKEN }}'
- name: Cleanup Artifacts for Windows
if: matrix.os == 'windows-latest'
run: |
npx rimraf "packages/desktop/release/!(*.exe)"
- name: Cleanup Artifacts for MacOS
if: matrix.os == 'macos-latest'
run: |
npx rimraf "packages/desktop/release/!(*.dmg)"
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: '${{ matrix.os }}'
path: packages/desktop/release
- name: release
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install Pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: pnpm install
- name: Build Electron App
run: 'pnpm run build:desktop'
env:
GITHUB_TOKEN: '${{ secrets.ACCESS_TOKEN }}'
- name: Cleanup Artifacts for Windows
if: matrix.os == 'windows-latest'
run: |
npx rimraf "packages/desktop/release/!(*.exe)"
- name: Cleanup Artifacts for MacOS
if: matrix.os == 'macos-latest'
run: |
npx rimraf "packages/desktop/release/!(*.dmg)"
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: '${{ matrix.os }}'
path: packages/desktop/release
- name: release
uses: softprops/action-gh-release@v2
if: "startsWith(github.ref, 'refs/tags/')"
with:
Expand Down

0 comments on commit 0994142

Please sign in to comment.