-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Can PrepareRelease
and Release
be in different workflows?
#1267
Comments
It definitely should work, but I think I've mostly used it with GitHub releases like this example so maybe there's something broken with tags 🤔 |
Putting the workflow back in one step worked. Just in case this is due to me screwing something up, here's the non-working Knope.toml: [package]
versioned_files = ["python-grpc/pyproject.toml", "python-grpc-betterproto/pyproject.toml", "rust/Cargo.toml", "golang/go.mod"]
[[workflows]]
name = "prepare"
[[workflows.steps]]
type = "PrepareRelease"
allow_empty = true
[[workflows.steps]]
type = "Command"
# Knope feature request to make this behavior automatic:
# https://github.com/knope-dev/knope/issues/162
command = "cargo update -w --manifest-path rust/Cargo.toml"
[[workflows]]
name = "release"
# Needed so that `prepare` and `release` can run in separate CI steps
[[workflows.steps]]
type = "Command"
command = "git add python-grpc/pyproject.toml python-grpc-betterproto/pyproject.toml rust/Cargo.toml rust/Cargo.lock golang/go.mod"
[[workflows.steps]]
type = "Command"
command = "git commit -m \"chore: prepare release $version\""
[workflows.steps.variables]
# `Version` is a "magic" Knope string that will be replaced with the actual version
"$version" = "Version"
[[workflows.steps]]
type = "Release"
# Needed because Knope doesn't have built-in GitLab support
[[workflows.steps]]
type = "Command"
command = "git push --push-option ci.skip"
[[workflows.steps]]
type = "Command"
command = "git push --tags --push-option ci.skip"
[[workflows.steps]]
type = "Command"
# See https://docs.gitlab.com/ee/user/project/releases/release_cli.html
command = "release-cli create --name \"Release $version\" --tag-name \"v$version\" --ref \"v$version\""
[workflows.steps.variables]
"$version" = "Version" And the working one: [package]
versioned_files = ["python-grpc/pyproject.toml", "python-grpc-betterproto/pyproject.toml", "rust/Cargo.toml", "golang/go.mod"]
[[workflows]]
name = "release"
[[workflows.steps]]
type = "PrepareRelease"
allow_empty = true
[[workflows.steps]]
type = "Command"
# Knope feature request to make this behavior automatic:
# https://github.com/knope-dev/knope/issues/162
command = "cargo update -w --manifest-path rust/Cargo.toml"
# Needed so that `prepare` and `release` can run in separate CI steps
[[workflows.steps]]
type = "Command"
command = "git add python-grpc/pyproject.toml python-grpc-betterproto/pyproject.toml rust/Cargo.toml rust/Cargo.lock golang/go.mod"
[[workflows.steps]]
type = "Command"
command = "git commit -m \"chore: prepare release $version\""
[workflows.steps.variables]
# `Version` is a "magic" Knope string that will be replaced with the actual version
"$version" = "Version"
[[workflows.steps]]
type = "Release"
# Needed because Knope doesn't have built-in GitLab support
[[workflows.steps]]
type = "Command"
command = "git push --push-option ci.skip"
[[workflows.steps]]
type = "Command"
command = "git push --tags --push-option ci.skip"
[[workflows.steps]]
type = "Command"
# See https://docs.gitlab.com/ee/user/project/releases/release_cli.html
command = "release-cli create --name \"Release $version\" --tag-name \"v$version\" --ref \"v$version\""
[workflows.steps.variables]
"$version" = "Version" The diff is merely:
Additionally, this is with v0.16.0; but I tested with v0.18.1 locally, without any |
You've previously mentioned that you wanted to be able to split the preparation workflow from the release workflow, so that they could be run as two separate steps. I thought that work was already done, but now I can't find where you referred to it.
It appears that this mostly works, but git tags are not created. Is that the expected behavior for now?
The text was updated successfully, but these errors were encountered: