Skip to content

Commit

Permalink
ci(build): update ci to use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommytrg committed Feb 14, 2024
1 parent 8e6d1f7 commit 779d629
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
34 changes: 13 additions & 21 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,33 @@ jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
strategy:
matrix:
os: [
macos-latest,
ubuntu-latest,
macos-latest,
ubuntu-latest,
windows-latest
]

steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.11.0

- uses: actions/setup-python@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
python-version: '2.7'
version: 8

- name: Build Electron app
- name: Build
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SIGN: false
run: |
yarn install --network-timeout 1000000
yarn electron:build --publish="never"
- name: Upload artifact
uses: actions/[email protected]
with:
# Artifact name
name: ${{ matrix.os }}-artifact
# Directory containing files to upload
# The build generated a folder with the following structure: release/RELEASE_VERSION/*
path: release/**/*
pnpm install
pnpm build --publish="never"
11 changes: 8 additions & 3 deletions .github/workflows/lintAndTest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
- uses: actions/[email protected]
with:
node-version: '20.11.0'
- run: yarn install --network-timeout 1000000
- run: yarn lint:check
- run: yarn test

- uses: pnpm/action-setup@v3
with:
version: 8

- run: pnpm install
- run: pnpm lint:check
- run: pnpm test
12 changes: 8 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
macos-latest,
ubuntu-latest,
windows-latest
]
]

steps:
- name: Check out Git repository
Expand All @@ -27,6 +27,10 @@ jobs:
with:
node-version: 20.11.0

- uses: pnpm/action-setup@v3
with:
version: 8

- name: Build & release Electron app
shell: bash
env:
Expand All @@ -39,12 +43,12 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SIGN: true
run: |
yarn install --network-timeout 1000000
yarn electron:build --publish="always"
pnpm install
pnpm build
- name: Upload artifact
uses: actions/[email protected]
with:
# Artifact name
name: ${{ matrix.os }}-artifact
# Directory containing files to upload
path: dist_electron
path: release/**/*

0 comments on commit 779d629

Please sign in to comment.