Skip to content

Commit

Permalink
feat: Support output parameters to expose installed edge (#396)
Browse files Browse the repository at this point in the history
Co-authored-by: Remi Deltombe <[email protected]>
  • Loading branch information
ueokande and remi-deltombe-vonage authored Sep 17, 2023
1 parent 3278d40 commit 3892198
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ steps:
run: (Get-Item (Get-Command msedge).Source).VersionInfo.ProductVersion
```
## Parameters
### Input
- `edge-version`:
*(Optional)* The Edge version to be installed. Supported versions are "stable", "beta", "dev", and "canary". Default: `stable`.

### Output

- `edge-version`: The installed Edge version. Useful when given a latest version.
- `edge-path`: The installed Edge path.

## License

[MIT](LICENSE)
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ inputs:
The Edge version to be installed. Supported versions are "stable", "beta", "dev"
default: stable
required: false
outputs:
edge-version:
description: 'The installed Edge version. Useful when given a latest version.'
edge-path:
description: 'The installed Edge path.'
runs:
using: 'node16'
main: 'index.js'
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ async function run(): Promise<void> {
const result = await installer.install(version, downloaded.archive);
core.info(`Successfully setup Edge ${version}`);

core.setOutput("edge-version", version);
core.setOutput("edge-path", path.join(result.root, result.bin));

return result;
})();

Expand Down

0 comments on commit 3892198

Please sign in to comment.