Skip to content

add changeset version check #25

add changeset version check

add changeset version check #25

Workflow file for this run

name: publish
on:
workflow_dispatch:
push:
branches:
- main
- add-changeset-version-check
permissions:
pull-requests: write
contents: write
jobs:
lint_test:
uses: babylonlabs-io/.github/.github/workflows/reusable_node_lint_test.yml@add-changeset-version-check
secrets: inherit
with:
run-build: true
run-unit-tests: false
run-changesets: true
run-changesets-version-check: true
publish: ${{ github.event_name == 'workflow_dispatch' }}
check_version_change:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check for version change
id: version_check
run: |
git fetch origin main
git diff origin/main -- package.json | grep '"version":' || echo "No version change detected"
- name: Conditional Release
if: steps.version_check.outputs.version_changed == 'true'
run: npm run release