diff --git a/.github/scripts/defineVersion.js b/.github/scripts/defineVersion.js index 07b9b2db9..62bb8ef20 100644 --- a/.github/scripts/defineVersion.js +++ b/.github/scripts/defineVersion.js @@ -26,4 +26,4 @@ function defineReleaseVersion({ core }, targetReleaseLevel, givenVersion) { return parsedPlayerVersion; } -module.exports = { defineReleaseVersion, getPlayerUiVersion }; +module.exports.defineReleaseVersion = defineReleaseVersion; diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 369271073..b13920a22 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,13 +23,13 @@ jobs: - name: Install dependencies run: npm ci - - name: Extract version from tag + - name: Read package.json version uses: actions/github-script@v6 id: extract-version with: script: | - const defineVersion = require('./.github/scripts/defineVersion.js') - return defineVersion.getPlayerUiVersion("v3.67.0") + const { version } = require('./package.json') + core.setOutput('packageJsonVersion', version) - uses: actions/download-artifact@v3 with: @@ -50,7 +50,7 @@ jobs: uses: ./.github/actions/publish-docs with: docs_path: './docs/' - destination_path: "player/ui/${{ fromJson(steps.extract-version.outputs.result).full }}/" + destination_path: "player/ui/${{ steps.extract-version.outputs.packageJsonVersion }}/" bucket: ${{ secrets.GCS_BUCKET }} credentials_json: ${{ secrets.GCS_CREDENTIALS }}