cargo-dist
cargo-dist copied to clipboard
Customizing CI panics if steps don't start with the name key
Version: 0.28.0
Steps to reproduce
Set this in dist-workspace.toml:
[workspace]
members = ["cargo:."]
[dist]
cargo-dist-version = "0.28.0"
ci = "github"
installers = ["shell", "powershell", "msi"]
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
install-path = "CARGO_HOME"
install-updater = false
pr-run-mode = "upload"
github-build-setup = "build-setup.yml" # This is the relevant one
Then in .github/workflows/build-setup.yml:
- uses: extractions/setup-just@v2
Running dist init (just hitting enter a few times) panics with:
x Failed to render template
`-> Backtrace:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: BaseThreadInitThunk
at <unknown source file>
2: RtlUserThreadStart
at <unknown source file>
undefined value (in ci/github/release.yml:238)
,-[238:19]
237 | {{%- for step in github_build_setup %}}
238 | - name: {{{ step.name }}}
: ^^^^^^^^^
239 | {{%- if step.id is not undefined %}}
`----
help: this is a bug in dist, let us know and we'll fix it: https://github.com/axodotdev/cargo-dist/issues/new
If you add name as the first key .github/workflows/build-setup.yml:
- name: Install just
uses: extractions/setup-just@v2
It runs with no issues.
Running actions like this is often done without a name because it can be noisy to name every little action step like checkout and rust-cache, so I think this should be fixed (although it's not urgent obviously).