From 83e161bb6eaa9d7f4594b4be0b69babe5646c8cc Mon Sep 17 00:00:00 2001 From: jmnote Date: Mon, 7 Sep 2026 04:08:50 +0900 Subject: [PATCH] release workflow: fix mathjax.tar path in the -with-mathjax tarball step git archive -o ../mathjax.tar was run from inside resources/MathJax, so it wrote to resources/mathjax.tar instead of the repo root, and the following `tar -Af base.tar mathjax.tar` couldn't find it. This broke the "Create GitHub release" step in the run triggered by 1.0.1 (https://github.com/jmnote/SimpleMathJax/actions/runs/34053829578), exit code 2, no release created. Write both archives to an absolute path captured before the `cd` instead. Also add a workflow_dispatch trigger, so a release can be retried by hand after a workflow bug like this one without a throwaway version bump; the existing "gh release view" check still skips it if the tag's release already exists. Verified by running the same steps against a detached worktree of main: the resulting SimpleMathJax-1.0.1-with-mathjax.tar.gz (6.2M) contains resources/MathJax/tex-chtml.js and extension.json at the expected paths. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/release.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 302351a3..85c4dc84 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,12 @@ name: release on: push: branches: [main] + # Lets a release be retried by hand (e.g. after a workflow bug like this + # one) without a throwaway version bump. github.event.before is empty on + # a manual run, so the version-changed check below always treats it as + # changed; "gh release view" still skips it if that tag's release + # already exists. + workflow_dispatch: {} permissions: contents: write @@ -53,10 +59,11 @@ jobs: # that doesn't require git. git submodule update --init --recursive + workdir="$PWD" asset_root="SimpleMathJax-$VERSION" asset="$asset_root-with-mathjax.tar.gz" - git archive --format=tar --prefix="$asset_root/" HEAD -o base.tar - ( cd resources/MathJax && git archive --format=tar --prefix="$asset_root/resources/MathJax/" HEAD -o ../mathjax.tar ) + git archive --format=tar --prefix="$asset_root/" HEAD -o "$workdir/base.tar" + ( cd resources/MathJax && git archive --format=tar --prefix="$asset_root/resources/MathJax/" HEAD -o "$workdir/mathjax.tar" ) tar -Af base.tar mathjax.tar gzip -c base.tar > "$asset"