Skip to content

Commit

Permalink
6
Browse files Browse the repository at this point in the history
  • Loading branch information
027xiguapi committed Apr 8, 2024
1 parent 3862b16 commit 90857b5
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,46 @@ jobs:
build:
name: build and release electron app
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false
- 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:
files: packages/desktop/release/**
env:
GITHUB_TOKEN: '${{ secrets.ACCESS_TOKEN }}'
- uses: pnpm/action-setup@v3
name: Install pnpm
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:
files: packages/desktop/release/**
env:
GITHUB_TOKEN: '${{ secrets.ACCESS_TOKEN }}'

0 comments on commit 90857b5

Please sign in to comment.