Skip to content

Refactor build.yaml: composite actions for setup/upload, new TinyTeX-N-os-arch.ext filenames#484

Merged
yihui merged 4 commits intomainfrom
copilot/refactor-build-jobs-and-update-binaries
Mar 5, 2026
Merged

Refactor build.yaml: composite actions for setup/upload, new TinyTeX-N-os-arch.ext filenames#484
yihui merged 4 commits intomainfrom
copilot/refactor-build-jobs-and-update-binaries

Conversation

Copy link
Contributor

Copilot AI commented Mar 5, 2026

Two improvements to the build workflow: consolidate duplicated steps across build-* jobs using composite actions, and adopt a new OS/arch-aware naming scheme for release binaries with backward-compatible copies.

Composite actions

setup-r-for-build

Extracts the five setup steps (checkout, Pandoc, R, R deps, update.packages()) shared across all four build-* jobs. Also adds a post-checkout rm -f TinyTeX-*.* cleanup as a safety measure.

upload-bundles

Replaces all per-job nick-fields/retry@v3 upload steps. Dynamically discovers assets in the working directory and uploads them — no hardcoded filename lists:

# Patterns searched in working directory:
TinyTeX-*.*  installer-unix.tar.*  tinitex.*  texlive-local.deb  regex.tar.gz

Implements 5-attempt retry with 10 s back-off via a portable shell: bash loop (works on Windows via Git Bash). Each build-* job and tinitex now ends with:

- name: Upload bundles
  uses: ./.github/actions/upload-bundles
  with:
    draft-tag: ${{ needs.new-release.outputs.draft-tag }}

New binary naming scheme

Format: TinyTeX-{N}-{os}-{arch}.{ext}, where arch is omitted for windows/darwin:

Job New filenames Backward-compat copies
build-windows TinyTeX-{0,1,}-windows.exe, TinyTeX-2-windows.exe TinyTeX-{0,1,}.zip, TinyTeX-2.exe
build-linux TinyTeX-{0,1,2,}-linux-x86_64.tar.xz TinyTeX-{0,1,2,}.tar.gz
build-linux-arm64 TinyTeX-{0,1,2,}-linux-arm64.tar.xz TinyTeX-{0,1,2,}-arm64.tar.gz
build-mac TinyTeX-{0,1,2,}-darwin.tar.xz TinyTeX-{0,1,2,}.tgz

All *nix archives use xz compression uniformly. Backward-compat copies are cp renames — tar xf auto-detects compression regardless of extension.

tinitex job

Added actions/checkout@v4 (required to resolve ./.github/actions/upload-bundles). Updated repackage step to place output files in the workspace root (mv ... ../..) so the upload composite action finds them without a cd tinitex/ workaround.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@CLAassistant
Copy link

CLAassistant commented Mar 5, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ yihui
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

…-os-arch.ext filenames

Co-authored-by: yihui <163582+yihui@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor build jobs to consolidate common steps and update TinyTeX binaries Refactor build.yaml: consolidate common steps into composite action, adopt new TinyTeX-N-os-arch.ext filenames Mar 5, 2026
Copilot finished work on behalf of yihui March 5, 2026 20:13
…scovery

Co-authored-by: yihui <163582+yihui@users.noreply.github.com>
Copilot AI changed the title Refactor build.yaml: consolidate common steps into composite action, adopt new TinyTeX-N-os-arch.ext filenames Refactor build.yaml: composite actions for setup/upload, new TinyTeX-N-os-arch.ext filenames Mar 5, 2026
Copilot finished work on behalf of yihui March 5, 2026 21:07
@yihui yihui marked this pull request as ready for review March 5, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants