Skip to content

Commit

Permalink
Combine setup and build steps in build job
Browse files Browse the repository at this point in the history
  • Loading branch information
mmounirf committed Mar 28, 2024
1 parent 147ffc6 commit 9b87cef
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,28 @@ jobs:
steps:
- run: echo 'Code quality workflow failed, skipping build'

setup:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

build:
runs-on: ubuntu-latest
needs: setup

steps:
- name: Build artifact
run: pnpm run build
- name: Upload artifact
Expand Down

0 comments on commit 9b87cef

Please sign in to comment.