3
0
Fork 0
mirror of https://github.com/dtolnay/install.git synced 2025-01-31 07:01:20 +01:00

Support building specific pinned version

This commit is contained in:
David Tolnay 2025-01-25 01:35:31 -08:00
parent 397358d64b
commit b5677c24ba
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -6,6 +6,9 @@ on:
crate:
required: true
type: string
version:
required: false
type: string
bin:
required: false
type: string
@ -48,7 +51,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{inputs.toolchain}}
- run: cargo install --force ${{inputs.git && format('--path={0}', inputs.path || '.') || inputs.crate}} --bin ${{inputs.bin || inputs.crate}} ${{inputs.locked && '--locked' || ''}}
- run: cargo install --force ${{inputs.git && format('--path={0}', inputs.path || '.') || inputs.crate}} ${{inputs.version && format('--version={0}', inputs.version) || ''}} --bin ${{inputs.bin || inputs.crate}} ${{inputs.locked && '--locked' || ''}}
working-directory: ${{inputs.git && inputs.crate || '.'}}
- id: which
run: echo "which=$(which ${{inputs.bin || inputs.crate}})" >> $GITHUB_OUTPUT