Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and chrysle committed Jan 6, 2024
1 parent c45611c commit 6684eb2
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

0 comments on commit 6684eb2

Please sign in to comment.