Skip to content

Commit 0ebbc0b

Browse files
authored
Update handling of action outputs (#442)
1 parent 86f2b4d commit 0ebbc0b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

jupyter_releaser/util.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,11 @@ def latest_draft_release(gh, branch=None):
395395

396396

397397
def actions_output(name, value):
398-
"Print the special GitHub Actions `::set-output` line for `name::value`"
398+
"""Handle setting an action output on GitHub"""
399399
log(f"\n\nSetting output {name}={value}")
400-
if "GITHUB_ACTIONS" in os.environ:
401-
log(f"::set-output name={name}::{value}")
400+
if "GITHUB_ENV" in os.environ:
401+
with open("GITHUB_ENV", "a") as fid:
402+
fid.write(f"{name}={value}\n")
402403

403404

404405
def get_latest_tag(source, since_last_stable=False):

0 commit comments

Comments
 (0)