diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 59d9e173e2..03475f49cf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -126,7 +126,7 @@ jobs: bump-changelog: name: Bump changelog on release if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - needs: [pypi-publish, upload-zipapp] + # needs: [pypi-publish, upload-zipapp] runs-on: ubuntu-latest permissions: contents: write @@ -135,11 +135,19 @@ jobs: uses: actions/checkout@v4 - name: Extract release tag run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - name: Create pull request branch + run: git switch -c "bump-changelog-for-${RELEASE_VERSION}" - name: Update changelog run: echo -e "## dev\n\n## $RELEASE_VERSION\n$(tail -n +2 CHANGELOG.md)" > CHANGELOG.md - name: Commit and push change run: | - git config --global user.name 'chrysle' - git config --global user.email '96722107+chrysle@users.noreply.github.com' + git config --global user.name 'GitHub Actions' + git config --global user.email 'gh-action@users.noreply.github.com' git commit -am "Bump changelog for $RELEASE_VERSION" - git push origin HEAD:main + git push origin "bump-changelog-for-${RELEASE_VERSION}" + - name: Create pull request + run: | + git fetch origin + gh pr create --base main --fill + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}