Refactor build command in windows-build.yml: Remove pnpm version spec… #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish Electron App | |
on: | |
push: | |
branches: | |
- "**" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18.x" | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build TypeScript | |
run: pnpm run build | |
working-directory: ./native | |
- name: Make Electron app | |
run: pnpm run make | |
working-directory: ./native | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os }}-build | |
path: native/out/make/**/* | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18.x" | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 8 | |
- name: Install dependencies | |
run: pnpm install | |
working-directory: ./native | |
- name: Publish Electron app | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: pnpm run publish | |
working-directory: ./native |