-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add addToPath
options
#732
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Okay after having a bit of a problem with I have this working successfully in a project. LMK any changes, what to add to the README or if you even want this lol. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR. Its a nice to have feature.
core.addPath(out); | ||
core.info(`Added ${out} to PATH`); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if this functionality is covered by some tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have added tests and they pass. However I find this download works test1:
runs-on: ubuntu-latest
if: true
steps:
- uses: kaleidawave/release-downloader@add-rename-and-path-env
with:
repository: 'kaleidawave/ezno'
addToPath: true
latest: true
out-file-path: ezno-binary
fileName: '*-linux'
- run: ezno info but this download does not work. This repository releases a compressed download-hyperfine:
runs-on: ubuntu-latest
if: true
env:
ACTIONS_STEP_DEBUG: true
steps:
- uses: kaleidawave/release-downloader@add-rename-and-path-env
with:
repository: 'sharkdp/hyperfine'
addToPath: true
latest: true
out-file-path: hyperfine-binary
fileName: '*-x86_64-unknown-linux-gnu*'
extract: true
- run: file $(which hyperfine) # prints 'hyperfine: gzip compressed data, from Unix, original size modulo 2^32 1443840' Extract should be done before? Not sure what is going on, maybe you have an idea otherwise will look at it later? |
Also while writing tests I tried replacing these release-downloader/__tests__/main.test.ts Line 37 in b5cac74
but it didn't work? Not sure why? |
Want to use this action for downloading a executable binary on a GitHub release, but was some missing automated renaming and adding to the
$PATH
environment variable. This PR adds that functionality under a new option.