Skip to content

Add release automation script#3832

Open
svekars wants to merge 2 commits intomainfrom
automate-release
Open

Add release automation script#3832
svekars wants to merge 2 commits intomainfrom
automate-release

Conversation

@svekars
Copy link
Copy Markdown
Contributor

@svekars svekars commented Apr 17, 2026

  • Adds .release/release_docs.py which automates the mechanical steps of the PyTorch documentation release checklist
  • Covers three phases: enable-nightly (after first RC), pre-release (a few days before release), and post-release (day after release)
  • Handles cross-repo changes in pytorch/docs (pytorch-versions.json, stable symlink, noindex tags) by shallow-cloning, committing, and pushing branches
    • Includes validation for pytorch-versions.json (schema checks, duplicate detection, preferred flag)
    • Safe to re-run: cleans up stale branches and handles no-op cases gracefully

What it automates

  • Enabling/disabling nightly CI workflow triggers
  • Updating torch version pins in requirements.txt and .jenkins/build.sh
  • Adding RC and stable entries to pytorch-versions.json in pytorch/docs
  • Updating the stable symlink in pytorch/docs
  • Running add_noindex_tag.sh for the previous version in pytorch/docs
  • Running lintrunner after local changes (if available)

What it does NOT automate

  • Merging PRs (you create, review, and merge manually)
  • Updating ecosystem package versions (torchrl, torchao, etc.)
  • Updating the "What's New" section in index.rst

Test plan

  • Run python .release/release_docs.py --phase list to verify help output
  • Run --phase enable-nightly with --cuda and verify workflow YAML, build.sh, and pytorch-versions.json changes
  • Run --phase pre-release and verify 4 PRs are created (1 tutorials + 3 docs)
  • Run --phase post-release and verify workflow is disabled and docker requirements updated
  • Run with --clean flag to verify stale clone is removed
  • Re-run a phase to verify idempotent behavior

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Apr 17, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3832

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit e59b62d with merge base f6afe53 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the cla signed label Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant