diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d25a02dd..4cc42363 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,7 +23,11 @@ env: # The itch.io page to upload to, in the format: `user-name/project-name`. # Comment this out to disable. {%- if itch_username != "" %} + {%- if itch_project != "" %} + ITCH_TARGET: {{itch_username}}/{{itch_project}} + {%- else %} ITCH_TARGET: {{itch_username}}/{{project-name}} + {%- endif %} {%- else %} # ITCH_TARGET: your-itch-username/{{project-name}} {%- endif %} diff --git a/cargo-generate.toml b/cargo-generate.toml index 5fe4d539..d223abd3 100644 --- a/cargo-generate.toml +++ b/cargo-generate.toml @@ -5,3 +5,6 @@ include = ["Cargo.toml", "Cargo.lock", ".github/workflows/*", "*.rs"] prompt = "Enter your itch.io username. Leave blank to disable itch.io upload." type = "string" default = "" + +[conditional.'itch_username != ""'.placeholders] +itch_project = { type = "string", prompt = "Enter the project name used in the itch.io URL. Leave blank to use this crate's `project-name`.", default = "" }