-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (59 loc) · 2.06 KB
/
reusable-build.yml
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
56
57
58
59
60
61
62
name: Build
on:
workflow_call:
env:
# 👇 Keep in sync with release and example apps workflow
DIST_ARTIFACT_NAME_SUFFIX: -dist
# 👇 Keep in sync with example apps workflow
COVERAGE_ARTIFACT_NAME_SUFFIX: -coverage
# 👇 Keep in sync with API Extractor workflow
TSC_ARTIFACT_NAME_SUFFIX: -tsc
jobs:
build:
name: Build libraries
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup
uses: ./.github/actions/setup
- name: Cache Angular build
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: .angular/cache
key: angular-cache
- name: Build libraries
run: pnpm run build
- name: Upload distribution files
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: ngx-meta${{ env.DIST_ARTIFACT_NAME_SUFFIX }}
path: projects/ngx-meta/dist
include-hidden-files: true
retention-days: 5
- name: Instrument for coverage
run: pnpm run instrument-for-coverage
- name: Upload distribution files with coverage instrumentation
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: ngx-meta${{ env.DIST_ARTIFACT_NAME_SUFFIX }}${{ env.COVERAGE_ARTIFACT_NAME_SUFFIX }}
path: projects/ngx-meta/dist
retention-days: 5
tsc:
name: TypeScript compilation
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup
uses: ./.github/actions/setup
- name: Run tsc
run: pnpm run ngx-meta:tsc
- name: Upload compiled JS files
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: ngx-meta${{ env.TSC_ARTIFACT_NAME_SUFFIX }}
path: projects/ngx-meta/out
retention-days: 5