You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: optionally apply github-build-setup steps to additional jobs.
For some use cases, such as using private Git crate dependencies in a
project's Cargo.toml manifest, Github Actions requires a certain amount
of ceremony to alias the private repo's Git URL to to something that can
be cloned using an access token. For the `build-local-artifacts` job,
this can be accomplished by adding the authentication step in the
`github-build-setup` YML file.
There are additional jobs that necessitate these credentials be set,
mainly the `plan`, `build-global-artifacts`, and `host`. This
appears to be due to the fact they invoke `cargo metadata` (which
attempts to pull dependencies).
Support these use-cases by introducing a `github-build-setup-jobs` collection
which allows users to opt-in to including the `github-build-setup`
steps in various jobs.
Fixes#2065
Copy file name to clipboardExpand all lines: cargo-dist/src/config/v0.rs
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -466,10 +466,14 @@ pub struct DistMetadata {
466
466
#[serde(default, with = "opt_string_or_vec")]
467
467
pubinstall_libraries:Option<Vec<LibraryStyle>>,
468
468
469
-
/// Any additional steps that need to be performed before building local artifacts
469
+
/// Any additional steps that need to be performed before executing certain job steps
470
470
#[serde(default)]
471
471
pubgithub_build_setup:Option<String>,
472
472
473
+
/// The jobs to which the [`DistMetadata::github_build_setup`] steps should be prepended
474
+
#[serde(default)]
475
+
pubgithub_build_setup_jobs:Option<Vec<String>>,
476
+
473
477
/// Configuration specific to Mac .pkg installers
474
478
#[serde(skip_serializing_if = "Option::is_none")]
475
479
#[serde(default)]
@@ -572,6 +576,7 @@ impl DistMetadata {
572
576
package_libraries: _,
573
577
install_libraries: _,
574
578
github_build_setup: _,
579
+
github_build_setup_jobs: _,
575
580
mac_pkg_config: _,
576
581
min_glibc_version: _,
577
582
binaries: _,
@@ -679,6 +684,7 @@ impl DistMetadata {
679
684
package_libraries,
680
685
install_libraries,
681
686
github_build_setup,
687
+
github_build_setup_jobs,
682
688
mac_pkg_config,
683
689
min_glibc_version,
684
690
binaries,
@@ -807,6 +813,9 @@ impl DistMetadata {
807
813
if github_build_setup.is_some(){
808
814
warn!("package.metadata.dist.github-build-setup is set, but this is only accepted in workspace.metadata (value is being ignored): {}", package_manifest_path);
809
815
}
816
+
if github_build_setup_jobs.is_some(){
817
+
warn!("package.metadata.dist.github-build-setup-jobs is set, but this is only accepted in workspace.metadata (value is being ignored): {}", package_manifest_path);
0 commit comments