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

ci(*): automate the version bump process #549

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Mossaka
Copy link
Member

@Mossaka Mossaka commented Apr 5, 2024

this PR automates the version bump process to
ask the bot to create a PR to bump the respective
crate's version to the given one on behalf of humans.

the PR created by the bot contains magic message that
will be parsed by another workflow publish which triggers
on merge to the main branch.

The publish workflow parses the commit message to get
crate, version and dry-run information to be able to
publish the crate, release binary and push tags.

the motivation for this commit is to further simplify the
release process

builds on top of #548

@Mossaka Mossaka changed the title CI: automate the version bump process ci(*): automate the version bump process Apr 5, 2024
@Mossaka Mossaka requested a review from devigned April 12, 2024 16:13
trigger CI to execute which will then enable merging this PR.
EOF
- name: Make a PR
run: gh pr create -B "$PR_BASE" -H "$PR_HEAD" --title "$PR_TITLE" --body "$(cat ./pr-body)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I recalled the problem with using the github actions token for opening pull requests: Jobs will not trigger on that pull request.
So you can open the PR but CI will not run.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh yes, but I think that's fine as long as we document it in the release.md something like "you need to close the PR and re-open the PR to trigger the CIs". How does this sound?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"When the PR opens, close it then reopen it. Don't ask questions."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that works that's fine.

devigned
devigned previously approved these changes Apr 16, 2024
Copy link
Contributor

@devigned devigned left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Mossaka Mossaka dismissed devigned’s stale review April 16, 2024 19:22

The merge-base changed after approval.

Comment on lines +5 to +6
push:
branches: [main]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem right.
Looks like its going to run this on every merge to main?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, a release branch would make more sense?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the intent would be to run this on tag rather than on a branch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intention is to run the publish action after the version bump PR merged to main branch

Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
this commit automates the version bump process to
ask the bot to create a PR to bump the respective
crate's version to the given one on behalf of humans.

the PR created by the bot contains magic message that
will be parsed by another workflow `publish` which triggers
on merge to the main branch.

The `publish` workflow parses the commit message to get
crate, version and dry-run information to be able to
publish the crate, release binary and push tags.

the motivation for this commit is to further simplify the
release process

Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
this commit removes signing from the build CI as the release
pipeline will now handle signing of the binaries downloaded
using actions/download-artifact.

the biggest change is that the parse script is re-write to
be able to output all the necessary variables such as
`runtime`, `dry_run` and more.

the action-sign workflow is also modified to take an extra
`path` input to replace the hard-coded `dist/bin` path

Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
@Mossaka
Copy link
Member Author

Mossaka commented May 22, 2024

This PR may need some love, but let me first release a new version of runwasi

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.

None yet

3 participants