-
-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (48 loc) · 1.62 KB
/
pr-checks.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
name: PR Checks (Dry-Run)
on:
pull_request:
jobs:
main:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Debug
run: echo "$RELEASE_SPECIFIER"
# Step 1: Check out the repository code
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the entire history to allow proper versioning
# Step 2: Set up bun package manager
- name: Install bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
# Step 3: Set up Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache dependencies
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.OS }}-20.x-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-20.x-
# Step 5: Install dependencies
- name: Install dependencies
run: bun i --frozen-lockfile
# Step 6: Set SHAs for nx workspace
- name: Set SHAs for Nx workspace
uses: nrwl/nx-set-shas@v4
# Step 7: Run the build for the affected changes
- name: Run Nx lint, test and build
run: bunx nx affected -t lint test build --exclude nextjs,vue3
# Step 8: Run the release in dry-run mode
- name: Run Nx release version (dry-run)
run: bunx nx release version --dry-run
# Step 9: Clean up dist directory
- name: Cleanup dist directory
run: rm -rf ./dist # Remove the dist directory to start fresh