| name: post release |
| |
| on: |
| release: |
| types: published |
| |
| permissions: {} |
| |
| jobs: |
| update-stable: |
| runs-on: ubuntu-latest |
| if: github.event.release.prerelease != 'true' |
| permissions: |
| contents: write # Needed to push to stable |
| |
| steps: |
| - name: Checkout stable branch |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| with: |
| ref: stable |
| fetch-depth: 0 |
| persist-credentials: true # needed for `git push` below |
| |
| - name: Update stable branch to release tag & push |
| run: | |
| git reset --hard "${TAG_NAME}" |
| git push |
| env: |
| TAG_NAME: ${{ github.event.release.tag_name }} |
| |
| new-changelog: |
| runs-on: ubuntu-latest |
| if: github.event.release.prerelease != 'true' |
| permissions: |
| contents: write # Needed to push to new branch |
| pull-requests: write # Needed to create PR |
| steps: |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| with: |
| ref: main |
| fetch-tags: true |
| persist-credentials: true # Needed for git-auto-commit-action |
| |
| - name: Set up Python |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| with: |
| python-version: "3.14" |
| pip-version: "25.3" |
| |
| - run: python scripts/release.py -a |
| |
| - uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0 |
| with: |
| commit_message: Add new changelog |
| branch: ci/new-changelog |
| create_branch: true |
| |
| - name: Create PR |
| run: | |
| gh pr create \ |
| -t "Add new changelog" -b "" \ |
| -l "ci: skip news" -l "C: maintenance" \ |
| -a $USER |
| env: |
| GITHUB_TOKEN: ${{ github.token }} |
| USER: ${{ github.event.release.author.login }} |