From 099a844be6482a72f381d5cd251112239f5e42be Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 19 May 2026 15:11:21 +0100 Subject: [PATCH] Fix npm publish version updates --- .github/workflows/npm-publish.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index ed467a3c2..2c5297fa5 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -24,9 +24,18 @@ jobs: - name: Update versions run: | - npm version ${{ github.event.release.tag_name }} --ws --allow-same-version - for module in packages/modules/*; do npm install testcontainers@${{ github.event.release.tag_name }} --save -w $module; done - sed -i -E "s/(sonar.projectVersion)=.+/\1=${{ github.event.release.tag_name }}/" sonar-project.properties + TAG="${{ github.event.release.tag_name }}" + VERSION="${TAG#v}" + + npm version "$VERSION" --ws --allow-same-version --no-git-tag-version + + for module in packages/modules/*; do + npm pkg set "dependencies.testcontainers=^$VERSION" -w "$module" + done + + npm install --package-lock-only --ignore-scripts + + sed -i -E "s/(sonar.projectVersion)=.+/\1=$TAG/" sonar-project.properties - name: Build packages run: |