From 31420f402882e93a5dbe19717549f59dd7a934a4 Mon Sep 17 00:00:00 2001 From: Giovanni Ciatto Date: Thu, 25 May 2023 14:29:40 +0200 Subject: [PATCH] fix(release): version numbering on NPM release --- .github/workflows/build-and-deploy.yml | 1 + release.config.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 955bcb7..7cc3e5f 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -144,6 +144,7 @@ jobs: - uses: DanySK/build-check-deploy-gradle-action@2.2.6 env: STAGING_REPO_ID: ${{ needs.staging-repo.outputs.maven-central-repo-id }} + ENFORCE_VERSION: "${{ needs.staging-repo.outputs.next-version }}" with: build-command: true check-command: true diff --git a/release.config.js b/release.config.js index 509c2cc..f96eb03 100644 --- a/release.config.js +++ b/release.config.js @@ -1,9 +1,11 @@ var staging = "-PstagingRepositoryId=${process.env.STAGING_REPO_ID}" +var version = "-PforceVersion=${process.env.ENFORCE_VERSION}" var publishCmd = ` -./gradlew ${staging} releaseStagingRepositoryOnMavenCentral || exit 3 -./gradlew ${staging} publishJsPackageToNpmjsRegistry || exit 4 +./gradlew ${version} ${staging} releaseStagingRepositoryOnMavenCentral || exit 3 +./gradlew ${version} ${staging} publishJsPackageToNpmjsRegistry || exit 4 ` + var config = require('semantic-release-preconfigured-conventional-commits'); config.plugins.push( [