-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Prepare for set-output deprecation #1
Labels
Comments
I cooked up a fix, but I would strongly urge you to include the diff --git a/index.js b/index.js
index 2bb3e36..62d5ca9 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,16 @@
+const { v4: uuidv4 } = require("uuid");
+const { EOL } = require("os");
+const { appendFileSync } = require("fs");
+
function setOutput(name, value, stdout) {
- stdout.write(`::set-output name=${name}::${value}\n`);
+ const filePath = process.env["GITHUB_OUTPUT"];
+ if (filePath) {
+ const delimiter = "ghadelimiter_" + uuidv4();
+ const output = name + "<<" + delimiter + EOL + value + EOL + delimiter + EOL;
+ appendFileSync(filePath, output);
+ } else {
+ stdout.write(`::set-output name=${name}::${value}\n`);
+ }
}
function verifyConditions(_pluginConfig, { stdout }) { I'm unsure of how to add dependencies to a semantic-release plugin, but I trust you can find this useful for a fix. |
Thanks a lot for the heads up, I will use the actions/core method instead. |
🎉 This issue has been resolved in version 1.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
set-output
is being deprecated, see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/The fix is to either manually write to
$GITHUB_OUTPUT
yourself, or better, use thesetOutput
method in[@actions/core]
(https://www.npmjs.com/package/@actions/core).The text was updated successfully, but these errors were encountered: