generated from alexk111/node-red-node-typescript-starter
-
Notifications
You must be signed in to change notification settings - Fork 9
40 lines (31 loc) · 1.08 KB
/
pr.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
name: Pull Request
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: latest
- name: Install Dependencies
run: pnpm install
- name: Build Package
run: pnpm build
- name: "Compare Version"
id: compare
uses: sharesight/compare-package-json-version-with-latest@v2.0.0
- name: Debug
run: |
echo current_version: ${{ steps.compare.outputs.current_version }}
echo latest_version: ${{ steps.compare.outputs.latest_version }}
echo matches?: ${{ steps.compare.outputs.matches }}
echo newer?: ${{ steps.compare.outputs.newer }}
echo diff: ${{ steps.compare.outputs.diff }}
- name: Fail if not newer
if: steps.compare.outputs.newer != 'true'
run: |
echo Version was not newer: ${{ steps.compare.outputs.current_version }} vs. ${{ steps.compare.outputs.latest_version }}
exit 1