forked from taiki-e/upload-rust-binary-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
92 lines (88 loc) · 3.33 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Build and upload Rust binary to GitHub Releases
description: GitHub Action for building and uploading Rust binary to GitHub Releases
inputs:
bin:
description: >
Comma-separated list of binary names (non-extension portion of filename) to build and upload.
Note that glob pattern is not supported yet.
required: true
archive:
description: Archive name (non-extension portion of filename) to be uploaded (variables `$bin`, `$target`, `$tag`, and any string)
required: false
default: '$bin-$target'
target:
description: Target name, default is host triple
required: false
features:
description: Comma-separated list of cargo build features to enable
required: false
no_default_features:
description: Whether to disable cargo build default features
required: false
default: 'false'
manifest_path:
description: Override cargo manifest path
required: false
tar:
description: On which platform to distribute the `.tar.gz` file (all, unix, windows, or none)
required: false
default: 'unix'
zip:
description: On which platform to distribute the `.zip` file (all, unix, windows, or none)
required: false
default: 'windows'
include:
description: >
Comma-separated list of additional files to be included to archive.
Note that glob pattern is not supported yet.
required: false
asset:
description: >
Comma-separated list of additional files to be uploaded separately.
Note that glob pattern is not supported yet.
required: false
leading_dir:
description: Whether to create the leading directory in the archive or not
required: false
default: 'false'
build_tool:
description: Tool to build binaries (cargo or cross)
required: false
checksum:
description: Comma-separated list of algorithms to be used for checksum (sha256, sha512, sha1, or md5)
required: false
token:
description: >
GitHub token for creating GitHub Releases.
If not set this option, the GITHUB_TOKEN environment variable will be used.
required: false
ref:
description: >
Fully-formed tag ref for this release.
If not set this option, the GITHUB_REF environment variable (automatically set by GitHub Actions) will be used.
required: false
# TODO: allow kebab-case input option names?
# Note:
# - inputs.* should be manually mapped to INPUT_* due to https://github.com/actions/runner/issues/665
# - Use GITHUB_*/RUNNER_* instead of github.*/runner.* due to https://github.com/actions/runner/issues/2185
runs:
using: composite
steps:
- run: bash --noprofile --norc "${GITHUB_ACTION_PATH:?}/main.sh"
shell: bash
env:
INPUT_BIN: ${{ inputs.bin }}
INPUT_ARCHIVE: ${{ inputs.archive }}
INPUT_TARGET: ${{ inputs.target }}
INPUT_FEATURES: ${{ inputs.features }}
INPUT_NO_DEFAULT_FEATURES: ${{ inputs.no_default_features }}
INPUT_MANIFEST_PATH: ${{ inputs.manifest_path }}
INPUT_TAR: ${{ inputs.tar }}
INPUT_ZIP: ${{ inputs.zip }}
INPUT_INCLUDE: ${{ inputs.include }}
INPUT_ASSET: ${{ inputs.asset }}
INPUT_LEADING_DIR: ${{ inputs.leading_dir }}
INPUT_BUILD_TOOL: ${{ inputs.build_tool }}
INPUT_CHECKSUM: ${{ inputs.checksum }}
INPUT_TOKEN: ${{ inputs.token }}
INPUT_REF: ${{ inputs.ref }}