diff --git a/.github/workflows/minor_version_release.yml b/.github/workflows/minor_version_release.yml index 89dc44ab2c..1f683bfb9c 100644 --- a/.github/workflows/minor_version_release.yml +++ b/.github/workflows/minor_version_release.yml @@ -53,17 +53,35 @@ jobs: - name: Bump version on ${{ steps.branch.outputs.name }} shell: bash env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # We use the HAYSTACK_BOT_TOKEN here so the PR created by the step will + # trigger required workflows and can be merged by anyone + GITHUB_TOKEN: ${{ secrets.HAYSTACK_BOT_TOKEN }} run: | git checkout "${{ steps.branch.outputs.name }}" + + # Tag the base with X.Y.Z-rc0. + # At this point VERSION.txt still contains the previous version and not + # the one specified by the tag. + # This is good though as we just need this to make reno work properly. NEW_VERSION=$(awk -F. '/[0-9]+\./{$2++;print}' OFS=. < VERSION.txt) echo "$NEW_VERSION" > VERSION.txt + VERSION_TAG="v$NEW_VERSION" + git tag "$VERSION_TAG" -m"$VERSION_TAG" + git push --tags + + # Create the branch that bump version in dev branch cat VERSION.txt + git checkout -b bump-version git add . git commit -m "Update unstable version to $NEW_VERSION" - VERSION_TAG="v$NEW_VERSION" - git tag "$VERSION_TAG" -m"$VERSION_TAG" - git push --atomic origin "${{ steps.branch.outputs.name }}" "$VERSION_TAG" + g push -u origin bump-version + + # Create the PR + gh pr create -B "${{ steps.branch.outputs.name }}" \ + -H bump-version \ + --title 'Bump unstable version' \ + --body 'Part of the release process' \ + --label 'ignore-for-release-notes' - uses: actions/setup-python@v5 with: