Skip to content

Commit df058f5

Browse files
committed
Fix gh command to trigger releases
1 parent 08eafef commit df058f5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/trigger-release/trigger-release.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@
2020
" on crates.io; creating a new release")
2121

2222
tag_name = "v" + crate_version
23-
print(" Tagging commit as " + tag_name)
2423
sha = subprocess.run(["git", "rev-parse", "HEAD"], check=True,
2524
stdout=subprocess.PIPE).stdout.decode("utf-8").strip()
25+
print(f" Tagging commit {sha} as {tag_name}")
2626

27-
subprocess.run([
27+
command = [
2828
"gh", "api", "--method", "POST", "-H", "Accept: application/vnd.github+json",
2929
"/repos/rust-osdev/bootloader/releases",
30-
"-f", f"tag_name='{tag_name}'", "-f", f"target_commitish='{sha}'",
31-
"-f", f"name='{tag_name}'",
32-
"-f", "body='[Changelog](https://github.com/rust-osdev/bootloader/blob/main/Changelog.md)'",
30+
"-f", f"tag_name={tag_name}", "-f", f"target_commitish={sha}",
31+
"-f", f"name={tag_name}",
32+
"-f", "body=\"[Changelog](https://github.com/rust-osdev/bootloader/blob/main/Changelog.md)\"",
3333
"-F", "draft=false", "-F", "prerelease=false", "-F", "generate_release_notes=false",
34-
])
34+
]
35+
print(" Running `" + ' '.join(command) + '`')
36+
subprocess.run(command, check=True)
3537

3638
print(" Done")

0 commit comments

Comments
 (0)