-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.41 KB
/
Copy pathbuild.yml
File metadata and controls
55 lines (48 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build
on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: false
description: 'Codecov token (used by the Coverage workflow). Optional.'
outputs:
artifact-name:
description: 'Name of the uploaded dist artifact (unique per commit SHA).'
value: ${{ jobs.build.outputs.artifact-name }}
env:
DEFAULT_ARTIFACT_NAME: dist-${{ github.sha }}
jobs:
build:
name: Build packages
runs-on: ubuntu-latest
outputs:
artifact-name: ${{ env.DEFAULT_ARTIFACT_NAME }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Install PNPM
uses: pnpm/action-setup@v6
with:
version-file: package.json
run_install: |
- recursive: true
args: [--frozen-lockfile, --ignore-scripts]
- name: Build packages
run: pnpm build
env:
CODECOV_TOKEN: ${{ github.event_name != 'merge_group' && secrets.CODECOV_TOKEN || '' }}
- name: Upload build artifact
uses: actions/upload-artifact@v7
with:
name: ${{ env.DEFAULT_ARTIFACT_NAME }}
overwrite: true
retention-days: 1
compression-level: 6
path: packages/**/dist
if-no-files-found: error