From 145a1ec1ca80376df07ff56a4a45e44af58126c8 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Fri, 26 Jan 2024 14:29:56 +0000 Subject: [PATCH] Add back the `version` field to Cargo.toml (#189) The `version` and `publish` fields were removed in #181 since they are now optional for crates that are not published to crates.io. However, even though this crate isn't published to crates.io, the `version` field is still used/set as part of the current GitHub Releases publishing process, which uses `cargo-bump` to generate an appropriate new version number based on the major/minor/patch workflow input. Fixes: ``` $ cargo bump 0.3.10 thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-bump-1.1.0/src/main.rs:57:14: toml has version ``` Seen in: https://github.com/heroku/languages-github-actions/actions/runs/7669085052/job/20902261440#step:9:10 --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index a78a47ee..3d7ffccc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,10 @@ name = "languages-github-actions" rust-version = "1.75" edition = "2021" +# This crate isn't published to crates.io, however, we still need the version field here, +# since it's updated to the real version as part of tagging/publishing to GitHub releases. +version = "0.0.0" +publish = false [[bin]] name = "actions"