Skip to content

Commit ef6f41f

Browse files
committed
Experimenting with Github Actions
1 parent 64d0c4e commit ef6f41f

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/base.yml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: 'Base Pipeline'
2+
3+
env:
4+
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
5+
NODE_VERSION: 20
6+
7+
defaults: &defaults
8+
steps:
9+
- &checkout
10+
name: Checkout code
11+
ses: actions/checkout@v4
12+
13+
- &setup-node
14+
name: Set up Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: ${{ env.NODE_VERSION }}
18+
cache: 'yarn'
19+
20+
jobs:
21+
warmup:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- *checkout
25+
- *setup-node
26+
- name: Install dependencies
27+
run: yarn install --frozen-lockfile
28+
29+
lint:
30+
runs-on: ubuntu-latest
31+
needs:
32+
- warmup
33+
steps:
34+
- *checkout
35+
- *setup-node
36+
- name: Lint
37+
run: yarn lint
38+
39+
format:
40+
runs-on: ubuntu-latest
41+
needs:
42+
- warmup
43+
steps:
44+
- *checkout
45+
- *setup-node
46+
- name: Format
47+
run: yarn format
48+
49+
build:
50+
runs-on: ubuntu-latest
51+
needs:
52+
- warmup
53+
steps:
54+
- *checkout
55+
- *setup-node
56+
- name: Cache NX cache
57+
uses: actions/cache@v4
58+
with:
59+
path: .nx/cache
60+
key: ${{ runner.os }}-nx-${{ hashFiles('yarn.lock') }}
61+
restore-keys: ${{ runner.os }}-nx-
62+
- name: Build Packages
63+
run: yarn build
64+
- name: Upload build artifacts
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: packages
68+
path: |
69+
packages/core/dist/
70+
packages/cli/dist/
71+
packages/rest/dist/
72+
packages/requester-utils/dist/

0 commit comments

Comments
 (0)