| 1 |
name: post release |
| 2 |
|
| 3 |
on: |
| 4 |
release: |
| 5 |
types: published |
| 6 |
|
| 7 |
permissions: {} |
| 8 |
|
| 9 |
jobs: |
| 10 |
update-stable: |
| 11 |
runs-on: ubuntu-latest |
| 12 |
if: github.event.release.prerelease != 'true' |
| 13 |
permissions: |
| 14 |
contents: write # Needed to push to stable |
| 15 |
|
| 16 |
steps: |
| 17 |
- name: Checkout stable branch |
| 18 |
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 19 |
with: |
| 20 |
ref: stable |
| 21 |
fetch-depth: 0 |
| 22 |
persist-credentials: true # needed for `git push` below |
| 23 |
|
| 24 |
- name: Update stable branch to release tag & push |
| 25 |
run: | |
| 26 |
git reset --hard "${TAG_NAME}" |
| 27 |
git push |
| 28 |
env: |
| 29 |
TAG_NAME: ${{ github.event.release.tag_name }} |
| 30 |
|
| 31 |
new-changelog: |
| 32 |
runs-on: ubuntu-latest |
| 33 |
if: github.event.release.prerelease != 'true' |
| 34 |
permissions: |
| 35 |
contents: write # Needed to push to new branch |
| 36 |
pull-requests: write # Needed to create PR |
| 37 |
steps: |
| 38 |
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 39 |
with: |
| 40 |
ref: main |
| 41 |
fetch-tags: true |
| 42 |
persist-credentials: true # Needed for git-auto-commit-action |
| 43 |
|
| 44 |
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 45 |
with: |
| 46 |
python-version: "3.13" |
| 47 |
pip-version: "25.3" |
| 48 |
|
| 49 |
- run: python scripts/release.py -a |
| 50 |
|
| 51 |
- uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0 |
| 52 |
with: |
| 53 |
commit_message: Add new changelog |
| 54 |
branch: ci/new-changelog |
| 55 |
create_branch: true |
| 56 |
|
| 57 |
- name: Create PR |
| 58 |
run: | |
| 59 |
gh pr create \ |
| 60 |
-t "Add new changelog" -b "" \ |
| 61 |
-l "ci: skip news" -l "C: maintenance" \ |
| 62 |
-a $USER |
| 63 |
env: |
| 64 |
GITHUB_TOKEN: ${{ github.token }} |
| 65 |
USER: ${{ github.event.release.author.login }} |