-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (35 loc) · 1.17 KB
/
validate-release-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
name: Validate release PR
on:
pull_request:
branches:
- master
jobs:
check-label:
name: Check PR label is "parzh:develop"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check PR label is "parzh:develop"
run: |2
set -e
label="${{ github.event.pull_request.head.label }}"
if [ "$label" -ne "parzh:develop" ]; then
echo Expected label "parzh:develop", instead got "$label"
exit 1
fi
check-version-changed:
name: Check package.json version is updated
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Ensure package version updated
run: |2
set -e
incoming_version=$(node -pe "require('./package.json').version;")
if [ ! -z "$(npm view @parzh/retryable@$incoming_version version)" ]; then
echo "This version ($incoming_version) is already published; please, update version by running 'npm version <version>'"
exit 1
fi