@@ -102,30 +102,31 @@ jobs:
102102 - name : Update package version to base version
103103 run : npm version --no-git-tag-version --allow-same-version ${{ needs.release_metadata.outputs.version_number }}
104104
105- - name : Calculate and set beta version
105+ - name : Calculate beta version (without updating package.json)
106106 id : beta_version
107107 run : |
108- # Use the improved beta script
109- node ./.github/scripts/before-beta-release.cjs
110- # Output the version for later jobs
111- BETA_VERSION=$(node -p "require('./package.json').version" )
108+ # Use the improved beta script to calculate version only
109+ node ./.github/scripts/before-beta-release.cjs --calculate-only
110+ # The script will output the beta version without updating package.json
111+ BETA_VERSION=$(cat /tmp/beta_version.txt )
112112 echo "version=$BETA_VERSION" >> $GITHUB_OUTPUT
113- echo "Beta version: $BETA_VERSION"
113+ echo "Beta version calculated : $BETA_VERSION"
114114
115- - name : Update CHANGELOG.md
115+ - name : Update CHANGELOG.md only
116116 uses : DamianReeves/write-file-action@master
117117 with :
118118 path : CHANGELOG.md
119119 write-mode : overwrite
120120 contents : ${{ needs.release_metadata.outputs.changelog }}
121121
122- - name : Commit changes
122+ - name : Commit changelog only
123123 id : commit
124124 uses : EndBug/add-and-commit@v9
125125 with :
126126 author_name : Apify Release Bot
127127128- message : " chore(release): Update to ${{ steps.beta_version.outputs.version }} [skip ci]"
128+ message : " chore(release): Update changelog for ${{ steps.beta_version.outputs.version }} [skip ci]"
129+ add : ' CHANGELOG.md'
129130 push : true
130131
131132 - name : Create and push beta tag
@@ -155,7 +156,13 @@ jobs:
155156 echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
156157 npm ci
157158
158- - name : Verify version consistency
159+ - name : Set beta version in package.json
160+ run : |
161+ BETA_VERSION="${{ needs.update_changelog_and_version.outputs.beta_version }}"
162+ echo "Setting package.json version to: $BETA_VERSION"
163+ npm version --no-git-tag-version --allow-same-version "$BETA_VERSION"
164+
165+ - name : Verify version is set correctly
159166 run : |
160167 PACKAGE_VERSION=$(node -p "require('./package.json').version")
161168 EXPECTED_VERSION="${{ needs.update_changelog_and_version.outputs.beta_version }}"
0 commit comments