Skip to content

Commit

Permalink
Added subdirectory support
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehipwell committed Jun 30, 2023
1 parent 94bce72 commit 58e2dd2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
22 changes: 15 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---

<!--
- Added; for new features.
- Changed; for changes in existing functionality.
- Deprecated; for soon-to-be removed features.
- Removed; for now removed features.
- Fixed; for any bug fixes.
- Security; in case of vulnerabilities.
## [UNRELEASED]
### Added - For new features.
### Changed - For changes in existing functionality.
### Deprecated - For soon-to-be removed features.
### Removed - For now removed features.
### Fixed - For any bug fixes.
### Security - In case of vulnerabilities.
-->

## [Unreleased]
## [v0.2.0] - 2023-06-30

### Added

- Added support for nested artifacts via the `subdirectory` input.

## [v0.1.0] - 2023-05-22

### Added

Expand Down
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ inputs:
description: If the download needs extracting.
required: false
default: "true"
subdirectory:
description: Subdirectory within the archive to find the executable(s).
required: false
extract_mode_linux:
description: Extraction mode when the runner platform is Linux; one of tar.gz, zip, 7z, or xar. This can be used in the filename format as {ext}.
required: false
Expand Down Expand Up @@ -72,7 +75,6 @@ inputs:
check_command:
description: Command to test if the tool was installed correctly.
required: false

version:
description: Version of the GitHub release to lookup; latest is supported.
required: false
Expand Down Expand Up @@ -103,6 +105,7 @@ runs:
ext-linux: ${{ inputs.extract_mode_linux }}
ext-darwin: ${{ inputs.extract_mode_macos }}
ext-win32: ${{ inputs.extract_mode_windows }}
subdir: ${{ inputs.subdirectory }}
url-linux: ${{ inputs.filename_format_linux && format('https:/${{ inputs.owner }}/${{ inputs.repository }}/releases/download/${{ inputs.tag_prefix }}{version}/%s', inputs.filename_format_linux) }}
url-darwin: ${{ inputs.filename_format_macos && format('https:/${{ inputs.owner }}/${{ inputs.repository }}/releases/download/${{ inputs.tag_prefix }}{version}/%s', inputs.filename_format_macos) }}
url-win32: ${{ inputs.filename_format_windows && format('https:/${{ inputs.owner }}/${{ inputs.repository }}/releases/download/${{ inputs.tag_prefix }}{version}/%s', inputs.filename_format_windows) }}
Expand Down

0 comments on commit 58e2dd2

Please sign in to comment.