Skip to content

chore(deps-dev): bump @commitlint/config-conventional from 17.1.0 to 17.6.6 #16

chore(deps-dev): bump @commitlint/config-conventional from 17.1.0 to 17.6.6

chore(deps-dev): bump @commitlint/config-conventional from 17.1.0 to 17.6.6 #16

name: check if package version update
on:
pull_request:
branches:
- main
jobs:
check-version-update:
runs-on: ubuntu-latest
steps:
- name: checkout base branch
uses: actions/checkout@v2
with:
ref: main
path: base
- name: checkout pr branch
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
path: pr
- name: set up node.js
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: get versions
id: get-versions
run: |
BASE_VERSION=$(node -p "require('./base/package.json').version")
PR_VERSION=$(node -p "require('./pr/package.json').version")
echo "Base version: $BASE_VERSION"
echo "PR version: $PR_VERSION"
echo "BASE_VERSION=$BASE_VERSION" >> $GITHUB_ENV
echo "PR_VERSION=$PR_VERSION" >> $GITHUB_ENV
- name: check version update
run: |
if [ "$BASE_VERSION" = "$PR_VERSION" ]; then
echo "error: package.json version must be updated in the PR"
exit 1
else
echo "package.json version updated successfully"
fi