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: |