Skip to content

Commit

Permalink
Remove release-event check for determining version
Browse files Browse the repository at this point in the history
  • Loading branch information
strohganoff committed Nov 4, 2024
1 parent 1b8f32c commit 006a81b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions streamdeck/utils/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ def get_version():
if os.getenv("GITHUB_ACTIONS") != "true":
msg = "Missing $GITHUB_ACTIONS environment variable. This script must (currently) be run in a GitHub Actions environment."
raise RuntimeError(msg)
if os.getenv("GITHUB_EVENT_NAME") != "release":
msg = "Missing $GITHUB_EVENT_NAME environment variable or not a release event. This script must (currently) be triggered by a release event."
raise RuntimeError(msg)
# May restrict the event type in the future.
# if os.getenv("GITHUB_EVENT_NAME") != "release":
# msg = "Missing $GITHUB_EVENT_NAME environment variable or not a release event. This script must (currently) be triggered by a release event."
# raise RuntimeError(msg)

event_path = os.getenv("GITHUB_EVENT_PATH")

Expand All @@ -48,6 +49,9 @@ def get_version():
msg = "Error parsing event data as JSON."
raise json.JSONDecodeError(msg, e.doc, e.pos) from e

# May restrict the action type in the future.
# if event_data.get("action") != "published":
# raise RuntimeError

tag_name = event_data.get("release", {}).get("tag_name")

Expand Down

0 comments on commit 006a81b

Please sign in to comment.