-
Notifications
You must be signed in to change notification settings - Fork 39
59 lines (50 loc) · 1.51 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: 'Pull Request'
on: pull_request
jobs:
quality:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v1
with:
version: latest
- name: Run Biome
run: biome ci . # https://biomejs.dev/reference/cli/#biome-ci
build:
needs: quality
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Install Dependencies
run: pnpm install
- name: Build Package
run: pnpm build
version-check:
needs: build
runs-on: ubuntu-latest
if: github.base_ref == 'refs/heads/master'
steps:
- name: Check if version has been updated
if:
id: check-version-changed
uses: EndBug/version-check@v2
with:
diff-search: true
- name: Log when changed
if: steps.check-version-changed.outputs.changed == 'true'
run: |
echo "Version change found in commit ${{ steps.check.outputs.commit }}! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"
- name: Log when unchanged
if: steps.check-version-changed.outputs.changed == 'false'
run: |
echo "No version change. Please update the package version in package.json"
exit 1