diff --git a/cargo-dist-schema/src/snapshots/cargo_dist_schema__emit.snap b/cargo-dist-schema/src/snapshots/cargo_dist_schema__emit.snap index d50f4a8f1..2abe3889c 100644 --- a/cargo-dist-schema/src/snapshots/cargo_dist_schema__emit.snap +++ b/cargo-dist-schema/src/snapshots/cargo_dist_schema__emit.snap @@ -403,6 +403,13 @@ expression: json_schema "null" ] }, + "packages_install": { + "description": "Command to run to install dependencies", + "type": [ + "string", + "null" + ] + }, "runner": { "description": "Github Runner to user", "type": [ diff --git a/cargo-dist/tests/snapshots/akaikatana_basic.snap b/cargo-dist/tests/snapshots/akaikatana_basic.snap index 9475ef042..81a1f1ddf 100644 --- a/cargo-dist/tests/snapshots/akaikatana_basic.snap +++ b/cargo-dist/tests/snapshots/akaikatana_basic.snap @@ -1374,15 +1374,24 @@ jobs: - uses: swatinem/rust-cache@v2 - name: Install cargo-dist run: ${{ matrix.install_dist }} + - name: Install dependencies + run: | + ${{ matrix.packages_install }} - id: cargo-dist + name: Build # We force bash here just because github makes it really hard to get values up # to "real" actions without writing to env-vars, and writing to env-vars has # inconsistent syntax between shell and powershell. cargo-dist and jq work fine # in powershell. shell: bash run: | + CARGO="cargo" + if [[ -f "Brewfile" ]]; then + CARGO="brew bundle exec -- cargo" + fi + # Actually do builds and make zips and whatnot - cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json + $CARGO dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json echo "cargo dist ran successfully" # Parse out what we just built and upload it to the Github Release™ diff --git a/cargo-dist/tests/snapshots/akaikatana_repo_with_dot_git.snap b/cargo-dist/tests/snapshots/akaikatana_repo_with_dot_git.snap index 9475ef042..81a1f1ddf 100644 --- a/cargo-dist/tests/snapshots/akaikatana_repo_with_dot_git.snap +++ b/cargo-dist/tests/snapshots/akaikatana_repo_with_dot_git.snap @@ -1374,15 +1374,24 @@ jobs: - uses: swatinem/rust-cache@v2 - name: Install cargo-dist run: ${{ matrix.install_dist }} + - name: Install dependencies + run: | + ${{ matrix.packages_install }} - id: cargo-dist + name: Build # We force bash here just because github makes it really hard to get values up # to "real" actions without writing to env-vars, and writing to env-vars has # inconsistent syntax between shell and powershell. cargo-dist and jq work fine # in powershell. shell: bash run: | + CARGO="cargo" + if [[ -f "Brewfile" ]]; then + CARGO="brew bundle exec -- cargo" + fi + # Actually do builds and make zips and whatnot - cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json + $CARGO dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json echo "cargo dist ran successfully" # Parse out what we just built and upload it to the Github Release™ diff --git a/cargo-dist/tests/snapshots/axolotlsay_basic.snap b/cargo-dist/tests/snapshots/axolotlsay_basic.snap index f45367232..3bad52128 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_basic.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_basic.snap @@ -2269,15 +2269,24 @@ jobs: - uses: swatinem/rust-cache@v2 - name: Install cargo-dist run: ${{ matrix.install_dist }} + - name: Install dependencies + run: | + ${{ matrix.packages_install }} - id: cargo-dist + name: Build # We force bash here just because github makes it really hard to get values up # to "real" actions without writing to env-vars, and writing to env-vars has # inconsistent syntax between shell and powershell. cargo-dist and jq work fine # in powershell. shell: bash run: | + CARGO="cargo" + if [[ -f "Brewfile" ]]; then + CARGO="brew bundle exec -- cargo" + fi + # Actually do builds and make zips and whatnot - cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json + $CARGO dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json echo "cargo dist ran successfully" # Parse out what we just built and upload it to the Github Release™ diff --git a/cargo-dist/tests/snapshots/axolotlsay_edit_existing.snap b/cargo-dist/tests/snapshots/axolotlsay_edit_existing.snap index 31647c492..7ea581ac1 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_edit_existing.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_edit_existing.snap @@ -2244,15 +2244,24 @@ jobs: - uses: swatinem/rust-cache@v2 - name: Install cargo-dist run: ${{ matrix.install_dist }} + - name: Install dependencies + run: | + ${{ matrix.packages_install }} - id: cargo-dist + name: Build # We force bash here just because github makes it really hard to get values up # to "real" actions without writing to env-vars, and writing to env-vars has # inconsistent syntax between shell and powershell. cargo-dist and jq work fine # in powershell. shell: bash run: | + CARGO="cargo" + if [[ -f "Brewfile" ]]; then + CARGO="brew bundle exec -- cargo" + fi + # Actually do builds and make zips and whatnot - cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json + $CARGO dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json echo "cargo dist ran successfully" # Parse out what we just built and upload it to the Github Release™ diff --git a/cargo-dist/tests/snapshots/axolotlsay_no_homebrew_publish.snap b/cargo-dist/tests/snapshots/axolotlsay_no_homebrew_publish.snap index b5df6e902..36188a425 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_no_homebrew_publish.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_no_homebrew_publish.snap @@ -2244,15 +2244,24 @@ jobs: - uses: swatinem/rust-cache@v2 - name: Install cargo-dist run: ${{ matrix.install_dist }} + - name: Install dependencies + run: | + ${{ matrix.packages_install }} - id: cargo-dist + name: Build # We force bash here just because github makes it really hard to get values up # to "real" actions without writing to env-vars, and writing to env-vars has # inconsistent syntax between shell and powershell. cargo-dist and jq work fine # in powershell. shell: bash run: | + CARGO="cargo" + if [[ -f "Brewfile" ]]; then + CARGO="brew bundle exec -- cargo" + fi + # Actually do builds and make zips and whatnot - cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json + $CARGO dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json echo "cargo dist ran successfully" # Parse out what we just built and upload it to the Github Release™