Skip to content

Commit

Permalink
Touch up PR 73
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Apr 10, 2024
1 parent 7de3db9 commit 1943368
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Currently, this action is basically intended to be used in combination with an a
| include | false | Comma-separated list of additional files to be included to the archive | String | |
| asset | false | Comma-separated list of additional files to be uploaded separately | String | |
| leading-dir | false | Whether to create the leading directory in the archive or not | Boolean | `false` |
| bin-leading-dir | false | Create extra leading directory(s) for `bin` (i.e., the binary file(s)) in the archive | String | |
| bin-leading-dir | false | Create extra leading directory(s) for binary file(s) specified by `bin` option | String | |
| build-tool | false | Tool to build binaries (cargo, cross, or cargo-zigbuild, see [cross-compilation example](#example-workflow-cross-compilation) for more) | String | |
| ref | false | Fully-formed tag ref for this release (see [action.yml](action.yml) for more) | String | |
| manifest-path | false | Path to Cargo.toml | String | `Cargo.toml` |
Expand Down Expand Up @@ -575,7 +575,7 @@ You can use the `bin-leading-dir` option to create extra leading directory(s) fo
include: LICENSE,README.md
# (optional) Whether to create the leading directory in the archive or not. default to false.
leading-dir: true
# (optional) Create extra leading directory(s) for `bin`. default to empty.
# (optional) Create extra leading directory(s) for binary file(s) specified by `bin` option. default to empty.
bin-leading-dir: opt/leading
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ inputs:
required: false
default: 'false'
bin-leading-dir:
description: Create extra leading directory(s) for `bin` (e.g. the binary file) in the archive
description: Create extra leading directory(s) for binary file(s) specified by 'bin' option
required: false
build-tool:
description: Tool to build binaries (cargo, cross, or cargo-zigbuild)
Expand Down
4 changes: 2 additions & 2 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ if [[ "${INPUT_TAR/all/${platform}}" == "${platform}" ]] || [[ "${INPUT_ZIP/all/
tmpdir=$(mktemp -d)
mkdir "${tmpdir:?}/${archive}"
if [[ -n "${bin_leading_dir}" ]]; then
x mkdir -p "${tmpdir}/${archive}/${bin_leading_dir}"/
mkdir -p "${tmpdir}/${archive}/${bin_leading_dir}"/
filenames=("${bin_leading_dir%%/*}")
else
filenames=("${bins[@]}")
Expand All @@ -358,7 +358,7 @@ if [[ "${INPUT_TAR/all/${platform}}" == "${platform}" ]] || [[ "${INPUT_ZIP/all/
fi
done
for include in ${includes[@]+"${includes[@]}"}; do
cp -r "${include}" "${tmpdir}/${archive}"/
x cp -r "${include}" "${tmpdir}/${archive}"/
filenames+=("$(basename "${include}")")
done
pushd "${tmpdir}" >/dev/null
Expand Down

0 comments on commit 1943368

Please sign in to comment.