Skip to content

Commit

Permalink
chore(root): add upload and download artifact to transport lock file …
Browse files Browse the repository at this point in the history
…between jobs
  • Loading branch information
diegoazh committed Jan 3, 2025
1 parent 422c9ea commit 290c66d
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'pnpm'

- name: Install dependencies
run: pnpm install
- name: Upload pnpm-lock.yaml as artifact
uses: actions/upload-artifact@v3
with:
name: pnpm-lock
path: pnpm-lock.yaml
outputs:
lock-file: ./pnpm-lock.yaml

Expand All @@ -42,13 +44,20 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Download pnpm-lock.yaml artifact
uses: actions/download-artifact@v3
with:
name: pnpm-lock
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Build package
working-directory: ./packages/v3
run: pnpm run build
outputs:
dist-folder: ./packages/v3/dist
- name: Upload dist as artifact
uses: actions/upload-artifact@v3
with:
name: dist
path: ./packages/v3/dist

test:
name: Build project
Expand All @@ -67,8 +76,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
run: npm install -g [email protected]
# - name: Install pnpm
# run: npm install -g [email protected]
- name: Install dependencies
run: pnpm install
- name: Create env file
Expand All @@ -90,6 +99,14 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "22.x"
- name: Download pnpm-lock.yaml artifact
uses: actions/download-artifact@v3
with:
name: pnpm-lock
- name: Download dist artifact
uses: actions/download-artifact@v3
with:
name: dist
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Configure git credentials
Expand Down

0 comments on commit 290c66d

Please sign in to comment.