Skip to content

Updated yup to 1.4.0, fixed types #66

Updated yup to 1.4.0, fixed types

Updated yup to 1.4.0, fixed types #66

name: Check version
on:
pull_request:
branches:
- master
- main
jobs:
check-version:
name: Check Version
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Get PR version
id: pr_version
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Checkout main branch
uses: actions/checkout@v3
with:
ref: master
- name: Get main version
id: main_version
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Compare versions
run: |
if [ "${{ steps.pr_version.outputs.VERSION }}" != "${{ steps.main_version.outputs.VERSION }}" ]; then
echo "Version changed: ${{ steps.pr_version.outputs.VERSION }}"
else
echo "Version did not change"
exit 1
fi