Skip to content
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

Merged
merged 1 commit into from
Mar 2, 2025
Merged

create action to prepare releases #242

merged 1 commit into from
Mar 2, 2025

Conversation

yshavit
Copy link
Owner

@yshavit yshavit commented Mar 2, 2025

No description provided.

Copy link
Owner Author

@yshavit yshavit left a 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.

Comment on lines +90 to +104
- 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"
Copy link
Owner Author

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")"
Copy link
Owner Author

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.

@yshavit yshavit merged commit a25775a into main Mar 2, 2025
4 checks passed
@yshavit yshavit deleted the new-release-action branch March 2, 2025 09:39
@yshavit yshavit mentioned this pull request Mar 2, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant