Validate version bumped for v tags (#10567)

Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
Artyom Savchenko
2026-02-28 17:17:03 +07:00
committed by GitHub
parent 7ab3c00fa5
commit c3758432bf
3 changed files with 40 additions and 37 deletions
@@ -1,22 +0,0 @@
# Reusable action: set all @hcengineering package versions from a v tag ref
# (e.g. refs/tags/v0.7.370 → 0.7.370) using common/scripts/bump.js.
# Call only when github.ref is a v* tag (e.g. if: startsWith(github.ref, 'refs/tags/v')).
name: 'Set package versions'
description: 'Set all @hcengineering package versions from a v tag ref using bump.js'
inputs:
ref:
description: 'Git ref for the tag (e.g. github.ref, e.g. refs/tags/v0.7.370)'
required: true
outputs:
version:
description: 'Semver version derived from the tag (e.g. 0.7.370)'
runs:
using: 'composite'
steps:
- id: bump
run: |
VERSION="${INPUT_REF#refs/tags/v}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "VERSION=$VERSION" >> $GITHUB_ENV
node common/scripts/bump.js "$VERSION"
shell: bash
+9 -6
View File
@@ -77,11 +77,6 @@ jobs:
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Set package versions
if: startsWith(github.event.inputs.ref || github.ref, 'refs/tags/v')
uses: ./.github/actions/set-package-versions
with:
ref: ${{ github.event.inputs.ref || github.ref }}
- name: Cache node modules
uses: actions/cache@v5
env:
@@ -114,6 +109,14 @@ jobs:
- name: Model version from git tags
run: node common/scripts/install-run-rush.js model-version
- name: Verify package versions match tag
if: startsWith(github.event.inputs.ref || github.ref, 'refs/tags/v')
run: |
REF="${{ github.event.inputs.ref || github.ref }}"
VERSION="${REF#refs/tags/v}"
VERSION="${VERSION#v}"
node common/scripts/bump.js --check "$VERSION"
- name: Building...
run: node common/scripts/install-run-rush.js build
@@ -970,5 +973,5 @@ jobs:
REF="${{ github.event.inputs.ref || github.ref }}"
VERSION="${REF#refs/tags/v}"
VERSION="${VERSION#v}"
node common/scripts/bump.js "$VERSION"
node common/scripts/bump.js --check "$VERSION"
node common/scripts/safe-publish.js