diff --git a/.github/workflows/publish-templates.yml b/.github/workflows/publish-templates.yml index 7f541bede9d75..e89c1c15ed068 100644 --- a/.github/workflows/publish-templates.yml +++ b/.github/workflows/publish-templates.yml @@ -40,13 +40,19 @@ jobs: - name: Replace the workspace references in the template run: | set -euo pipefail + # Use released creates, instead of git references. find . -type f -name 'Cargo.toml' -exec psvm -o -v ${{ env.polkadot-release-version }} -p {} \; + + # Set the Rust edition. + rust_edition=$(cat ../../Cargo.toml | grep "edition =") + find . -type f -name 'Cargo.toml' -exec sed -i -E "s/edition\.workspace = true\$/$rust_edition/g" {} \; # Get rid of "authors.workspace = true" and similar entries. find . -type f -name 'Cargo.toml' -exec sed -i -E "s/^.*\.workspace = true\$//g" {} \; find . -type f -name 'Cargo.toml' -exec sed -i -E "s/^workspace = true\$//g" {} \; # Replace workspace dependencies with actual versions. + # e.g. serde_json = { workspace = true, default-features = true } replace_workspace_deps () { # To preserve TAB identation. IFS=''