Skip to content

Commit 1d22d39

Browse files
authored
Update check_latest_release.yml
Latest fixes to match PR
1 parent 053cf49 commit 1d22d39

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/check_latest_release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,15 @@ jobs:
3939
# Extract module name and version from the release tag
4040
# Assuming the tag format is <module_name>-<version>, e.g., nidigital-1.4.0
4141
if os.getenv("GITHUB_EVENT_NAME") == "workflow_dispatch":
42-
tag = os.getenv("INPUT_release_tag")
42+
tag = os.getenv("INPUT_RELEASE_TAG")
4343
else:
44-
with open(os.getenv("GITHUB_EVENT_PATH"), "r") as event_file:
44+
with open(os.getenv("GITHUB_EVENT_PATH"), "r", encoding="utf-8") as event_file:
4545
event = json.load(event_file)
4646
tag = event["release"]["tag_name"]
4747
48+
assert tag.count("-") == 1, f"Invalid tag format: {tag}. Expected format: <module_name>-<version>"
4849
module_name, module_version = tag.split("-")
49-
with open(os.getenv("GITHUB_OUTPUT"), "a") as output_file:
50+
with open(os.getenv("GITHUB_OUTPUT"), "a", encoding="utf-8") as output_file:
5051
output_file.write(f"module_name={module_name}\n")
5152
output_file.write(f"module_version={module_version}\n")
5253
# NOTE: we don't upload test coverage for this

0 commit comments

Comments
 (0)