Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ inputs:
repo-token:
description: 'GitHub repo token to use to avoid rate limiter'
default: ''
outputs:
version:
description: 'Actual version of the protoc compiler environment that has been installed'
path:
description: 'Path to where the protoc compiler has been installed'
runs:
using: 'node16'
main: 'dist/index.js'
Expand Down
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ function getProtoc(version, includePreReleases, repoToken) {
toolPath = yield downloadRelease(version);
process.stdout.write("Protoc cached under " + toolPath + os.EOL);
}
// expose outputs
core.setOutput("path", toolPath);
core.setOutput("version", targetVersion);
// add the bin folder to the PATH
core.addPath(path.join(toolPath, "bin"));
});
Expand Down
4 changes: 4 additions & 0 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ export async function getProtoc(
process.stdout.write("Protoc cached under " + toolPath + os.EOL);
}

// expose outputs
core.setOutput("path", toolPath);
core.setOutput("version", targetVersion);

// add the bin folder to the PATH
core.addPath(path.join(toolPath, "bin"));
}
Expand Down