Skip to content

Release workflow through a PR not working #11

Description

@gust-p

Whenever I have a monorepo, with a rust package "A" and another golang package "B". And I do a release of a patch of A. Then after I try to do same thing but with B, the whole workflow fails because knope release whenever I try to release the patch of B it also tries again to release the patch of "A", I don't know if this expected, here are my config and logs.

[packages.influxdb-exporter]
versioned_files = ["A/Cargo.toml", "A/Cargo.lock"]
changelog = "A/CHANGELOG.md"
assets = "artifacts/A*"

[packages.cli]
versioned_files = ["B/go.mod"]
changelog = "cli/CHANGELOG.md"
assets = "artifacts/B-*"

[packages.pipelines]
versioned_files = ["pipelines/pyproject.toml"]
changelog = "pipelines/CHANGELOG.md"

[[workflows]]
name = "prepare-release"

[[workflows.steps]]
type = "Command"
command = "git switch -c release"

[[workflows.steps]]
type = "PrepareRelease"

[[workflows.steps]]
type = "Command"
command = "git commit -m 'chore: prepare Okina release'"

[[workflows.steps]]
type = "Command"
command = "git push --force --set-upstream origin release"

[[workflows.steps]]
type = "CreatePullRequest"
base = "main"

[workflows.steps.title]
template = "chore: prepare Okina release"

[workflows.steps.body]
template = "This PR was created by Knope. Merging it will create a new release"

[[workflows]]
name = "document-change"

[[workflows.steps]]
type = "CreateChangeFile"

[[workflows]]
name = "release"

[[workflows.steps]]
type = "Release"

[github]
owner = "gust-p"
repo = "tutorial"
2025-04-25T11:42:16.8317762Z Loading package B
2025-04-25T11:42:16.8320753Z B/go.mod has version 0.0.2
2025-04-25T11:42:16.8322491Z Looking for Git tags matching package name.
2025-04-25T11:42:16.8324635Z No tags found matching pattern B/v
2025-04-25T11:42:16.8326474Z Loading package A
2025-04-25T11:42:16.8328715Z A/Cargo.toml has version 0.0.2
2025-04-25T11:42:16.8330779Z Looking for Git tags matching package name.
2025-04-25T11:42:16.8332870Z No tags found matching pattern A/v
2025-04-25T11:42:16.8342757Z Running step Release
2025-04-25T11:42:16.8345143Z Searching for last package tag to determine if there's a release to release
2025-04-25T11:42:16.8347686Z No tags found matching pattern B/v
2025-04-25T11:42:16.8357541Z Searching for last package tag to determine if there's a release to release
2025-04-25T11:42:16.8361278Z No tags found matching pattern A/v
2025-04-25T11:42:16.8402198Z Searching for last package tag to determine if there's a release to release
2025-04-25T11:42:16.8405545Z No tags found matching pattern pipelines/v
2025-04-25T11:42:20.3729494Z Error:   × Problem with workflow release
2025-04-25T11:42:20.3730314Z 
2025-04-25T11:42:20.3738109Z Error: github::api_request_error
2025-04-25T11:42:20.3742160Z 
2025-04-25T11:42:20.3742675Z   × Trouble communicating with GitHub while publishing release: 422:
2025-04-25T11:42:20.3743722Z   │ {"message":"Validation Failed","errors":
2025-04-25T11:42:20.3744357Z   │ [{"resource":"Release","code":"already_exists","field":"tag_name"}],"docum
2025-04-25T11:42:20.3744965Z   │ entation_url":"https://docs.github.com/rest/releases/releases#update-a-
2025-04-25T11:42:20.3745400Z   │ release","status":"422"}
2025-04-25T11:42:20.3745769Z   help: There was a problem communicating with GitHub, this may be a network
2025-04-25T11:42:20.3746154Z         issue or a permissions issue.
2025-04-25T11:42:20.3746334Z 
2025-04-25T11:42:20.3755628Z ##[error]Process completed with exit code 1.
2025-04-25T11:42:20.3851594Z Post job cleanup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions