-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yml
65 lines (63 loc) · 2.06 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: "cargo-multivers"
description: "Build multiple versions of a binary with different CPU features set merged into one portable optimized binary"
branding:
icon: "cpu"
color: "orange"
inputs:
version:
description: "Version of cargo-multivers to use (e.g., 0.7.0)"
required: false
manifest_path:
description: "Path to Cargo.toml"
required: false
target:
description: "Build for the target triple"
required: false
out_dir:
description: "Copy final artifacts to this directory"
required: true
default: "."
profile:
description: "Build artifacts with the specified profile (default: release)"
required: false
runner_version:
description: "Specify the version of the runner to use"
required: false
other_args:
description: "Other arguments given to cargo multivers"
required: false
build_args:
description: "Arguments given to cargo build"
required: false
runs:
using: 'composite'
steps:
- name: Install cargo-multivers (git main)
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-multivers
git: https://github.com/ronnychevalier/cargo-multivers
branch: main
if: "${{ inputs.version == 'main' }}"
- name: Install cargo-multivers (version)
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-multivers
version: ${{ inputs.version }}
if: "${{ inputs.version != '' && inputs.version != 'main' }}"
- name: Install cargo-multivers (latest)
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-multivers
if: "${{ inputs.version == '' }}"
- id: cargo-multivers
run: $GITHUB_ACTION_PATH/.github/action/entrypoint.sh
shell: bash
env:
INPUT_MANIFEST_PATH: ${{ inputs.manifest_path }}
INPUT_TARGET: ${{ inputs.target }}
INPUT_OUT_DIR: ${{ inputs.out_dir }}
INPUT_PROFILE: ${{ inputs.profile }}
INPUT_RUNNER_VERSION: ${{ inputs.runner_version }}
INPUT_OTHER_ARGS: ${{ inputs.other_args }}
INPUT_BUILD_ARGS: ${{ inputs.build_args }}