@@ -22,45 +22,47 @@ jobs:
2222 contents : write
2323 pull-requests : write
2424 env :
25- new_version : ' '
25+ VERSION : ' '
2626 steps :
2727 - uses : actions/checkout@v4
2828 - name : Setup Go
2929 uses : actions/setup-go@v4
3030 with :
3131 go-version : ' 1.22.x'
3232 cache-dependency-path : ${{ github.workspace }}/src/go.sum
33- - name : Check for Changes to the Changelog
34- id : diff
35- if : false
33+ - name : Set new beta version
34+ if : ${{ vars.RELEASE_NAME == 'parallels-desktop-beta' }}
35+ run : |
36+ VERSION=${{ github.event.inputs.version }}
37+ MAJOR_VERSION=${VERSION%.*}
38+ NEW_VERSION=${VERSION%.*}.${{ github.run_id }}
39+ echo "VERSION=${NEW_VERSION}" >> "$GITHUB_ENV"
40+ echo "MAJOR_VERSION=${MAJOR_VERSION}" >> "$GITHUB_ENV"
41+ - name : Set new version
42+ if : ${{ vars.RELEASE_NAME == 'parallels-desktop' }}
3643 run : |
3744 NEW_VERSION=$(./.github/workflow_scripts/increment-version.sh -t ${{ inputs.version }} -f VERSION)
38- LAST_CHANGELOG_VERSION=$(./.github/workflow_scripts/get-latest-changelog-version.sh)
39- if [ "$NEW_VERSION" != "$LAST_CHANGELOG_VERSION" ]; then
40- echo "Changelog not updated for version $NEW_VERSION latest version is $LAST_CHANGELOG_VERSION"
41- exit 1
42- fi
45+ echo "VERSION=${NEW_VERSION}" >> "$GITHUB_ENV"
4346 - name : Bump version and push
4447 env :
4548 GH_TOKEN : ${{ secrets.PARALLELS_WORKFLOW_PAT }}
49+ VERSION : ${{ github.event.inputs.version }}
4650 run : |
4751 git config --global user.email "cjlapao@gmail.com"
4852 git config --global user.name "cjlapao"
4953
50- NEW_VERSION=$(./.github/workflow_scripts/increment-version.sh -t ${{ inputs.version }} -f VERSION)
51- echo "$NEW_VERSION " > ./VERSION
54+
55+ echo "$VERSION " > ./VERSION
5256
5357 git checkout -b release/"$NEW_VERSION"
5458
5559 # Generate changelog for the new version
5660 ./.github/workflow_scripts/generate-changelog.sh --repo ${{ github.repository }} --version $NEW_VERSION
5761
5862 git add VERSION CHANGELOG.md
59- git commit -m "Release extension version $NEW_VERSION"
60-
61- git push --set-upstream origin release/$NEW_VERSION
63+ git commit -m "Release extension version $VERSION"
6264
63- echo "new_version=$NEW_VERSION" >> "$GITHUB_ENV"
65+ git push --set-upstream origin release/$VERSION
6466 - name : Generate beta release notes
6567 if : ${{ vars.RELEASE_NAME == 'parallels-desktop-beta' }}
6668 run : |
@@ -74,10 +76,10 @@ jobs:
7476 - name : Create PR
7577 run : |
7678 gh pr create \
77- --title "Release version ${{ env.new_version }}" \
79+ --title "Release version ${{ env.VERSION }}" \
7880 --body-file release_notes.md \
7981 --base main \
80- --head release/${{ env.new_version }}
82+ --head release/${{ env.VERSION }}
8183 gh pr edit --add-label release-request
8284 env :
8385 GH_TOKEN : ${{ secrets.PARALLELS_WORKFLOW_PAT }}
0 commit comments