-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (44 loc) · 1.32 KB
/
check_version.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
# This workflow compares package.json version with the main branch
name: Check version
on:
pull_request:
branches: [main]
paths:
- 'src/**'
- 'stories/**'
- 'public/**'
- 'typings/**'
- 'package.json'
- 'package-lock.json'
jobs:
compare-versions:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Get main branch package.json version
id: version-in-main
uses: martinbeentjes/[email protected]
- uses: actions/checkout@v4
- name: Get current package.json version
id: current-package-version
uses: martinbeentjes/[email protected]
- name: Compare package.json versions
if: ${{ steps.version-in-main.outputs.current-version == steps.current-package-version.outputs.current-version }}
run: |
echo "You need to have a different package.json version than the one in main"
exit 1
test-build:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.13.0
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
env:
NODE_OPTIONS: "--max_old_space_size=8192"