Skip to content

Commit b20316f

Browse files
photovoltexCopilot
andauthored
CI: Create a PR for the release preparations (#1631)
* ci: create a pr instead of commiting directly * ci: improve created PR body, adjust release.yml * Apply suggestions from code review Co-authored-by: Copilot <[email protected]> * ci: readd removed if --------- Co-authored-by: Copilot <[email protected]>
1 parent 6f8e1a2 commit b20316f

2 files changed

Lines changed: 30 additions & 6 deletions

File tree

.github/workflows/prepare-release.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
permissions:
2222
contents: write
23+
pull-requests: write
2324
steps:
2425
- name: Checkout code
2526
uses: actions/checkout@v5
@@ -49,9 +50,32 @@ jobs:
4950
tag: v${{ steps.get-version.outputs.VERSION }}
5051
version: ${{ steps.get-version.outputs.VERSION }}
5152

52-
- name: Commit version prepare
53-
uses: stefanzweifel/git-auto-commit-action@v6
53+
- name: Create PR to review automated changes
54+
uses: peter-evans/create-pull-request@v7
5455
if: ${{ !env.ACT }}
5556
with:
56-
commit_message: 'Prepare for v${{ steps.get-version.outputs.VERSION }} release'
57-
file_pattern: '*.md *.toml *.lock'
57+
commit-message: 'Preparations for v${{ steps.get-version.outputs.VERSION }}'
58+
title: "Preparations for v${{ steps.get-version.outputs.VERSION }}"
59+
branch: "prepare-release/v${{ steps.get-version.outputs.VERSION }}"
60+
assignees: ${{ github.actor }}
61+
body: |
62+
This PR prepares for the next ${{ github.event.inputs.versionBump }} release v${{ steps.get-version.outputs.VERSION }}.
63+
64+
**Files that should be automatically modified:**
65+
- `Cargo.toml` (version bump)
66+
- `<crate>/Cargo.toml` (version bump)
67+
> for patch versions only the necessary crates will receive an update
68+
- `Cargo.lock` (only bumps own crate versions)
69+
- `CHANGELOG.md` (finalize changelog for upcoming version)
70+
71+
**Review checklist:**
72+
- [ ] Confirm the version bump in `Cargo.toml` is correct
73+
- [ ] Ensure `Cargo.lock` did only update our crates
74+
- [ ] Review the changelog for accuracy and completeness
75+
76+
Please verify these changes before merging.
77+
78+
---
79+
After merging, continue by creating a new release with the tag `v${{ steps.get-version.outputs.VERSION }}`.
80+
81+
> See [PUBLISHING.md](https://github.com/librespot-org/librespot/blob/dev/PUBLISHING.md) for further infos.

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: release.yml
1+
name: publish on release creation
22
on:
33
release:
44
types:
@@ -31,4 +31,4 @@ jobs:
3131
if: ${{ !env.ACT }}
3232
env:
3333
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
34-
run: cargo publish --workspace --no-verify
34+
run: cargo publish --workspace

0 commit comments

Comments
 (0)