Skip to content

Commit

Permalink
Update handling of action outputs (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Oct 11, 2022
1 parent 86f2b4d commit 0ebbc0b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions jupyter_releaser/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,11 @@ def latest_draft_release(gh, branch=None):


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


def get_latest_tag(source, since_last_stable=False):
Expand Down

0 comments on commit 0ebbc0b

Please sign in to comment.