-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create action to prepare releases #242
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't perfect -- it still requires some manual intervention, as the two comments point out. But it's good enough for now. I'll figure out something better later.
- name: Dev Cargo.toml | ||
run: | | ||
sed -i 's/^version = ".*"/version = "${{ env.NEXT_DEV_VERSION }}"/' Cargo.toml | ||
cargo metadata >/dev/null | ||
|
||
- name: Dev Commit | ||
run: | | ||
set -euo pipefail | ||
git checkout -b "release-$RELEASE_VERSION-post" | ||
git commit -am "bump version to $NEXT_DEV_VERSION" | ||
git push --set-upstream origin "release-$RELEASE_VERSION-post" | ||
|
||
- name: Dev PR | ||
run: | | ||
gh pr create --title "Prepare v${NEXT_DEV_VERSION}" --body "Bump version to $NEXT_DEV_VERSION" --base "release-$RELEASE_VERSION" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "Dev *" steps don't quite work: the squash commit of the release version causes them to conflict once they change to target main.
Still, it's good enough for now.
- name: Create new release | ||
id: create_release | ||
run: | | ||
release_url="$(gh release create "$TAG_NAME" --draft --title "$TAG_NAME" --generate-notes --target "release-$RELEASE_VERSION")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Targeting the release commit doesn't quite work: we really want to target the version once it hits main.
No description provided.