Skip to content

Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.

Mirror release workflow: name the repository in every gh command

Mason3634e4ecddf1223
diff --git a/tools/mirror/release.yml b/tools/mirror/release.yml
index accbaba1..f1a9e14e 100644
--- a/tools/mirror/release.yml
+++ b/tools/mirror/release.yml
@@ -18,12 +18,13 @@ jobs:
- name: Release
env:
GH_TOKEN: ${{ github.token }}
+ # no checkout in this job: every gh command names the repository
run: |
tag="$GITHUB_REF_NAME"
- if gh release view "$tag" > /dev/null 2>&1; then
+ if gh release view "$tag" --repo "$GITHUB_REPOSITORY" > /dev/null 2>&1; then
echo "$tag is already released"
exit 0
fi
gh release download "$tag" --repo Mason363/NumPlay --pattern "{{ASSET}}" --dir "$RUNNER_TEMP"
- gh release create "$tag" "$RUNNER_TEMP/{{ASSET}}" --verify-tag --title "{{NAME}} $tag" --notes \
+ gh release create "$tag" "$RUNNER_TEMP/{{ASSET}}" --repo "$GITHUB_REPOSITORY" --verify-tag --title "{{NAME}} $tag" --notes \
"{{ASSET}} from [NumPlay $tag](https://github.com/Mason363/NumPlay/releases/tag/$tag): the same file, built and tested with every game there. How to install it: [the install guide](https://github.com/Mason363/NumPlay#how-to-install)."
diff --git a/tools/sync_mirror.py b/tools/sync_mirror.py
index 9232e4dd..cd9f85dd 100644
--- a/tools/sync_mirror.py
+++ b/tools/sync_mirror.py
@@ -197,7 +197,7 @@ def commit(m, dest, rev):
if git("diff", "--cached", "--quiet", cwd=dest, check=False).returncode == 0:
print("sync_mirror: the mirror is already up to date")
return
- paths = inputs(m)
+ paths = inputs(m) + ([os.path.relpath(RELEASE_TEMPLATE, ROOT)] if m["release"] else [])
name, email, date, subject = git(
"log", "-1", "--format=%an%n%ae%n%aI%n%s", rev, "--", *paths,
stdout=subprocess.PIPE, text=True).stdout.strip().split("\n", 3)