Skip to content

Add Pyrefly releases automatically - #8

Merged
kinto0 merged 1 commit into
mainfrom
kinto0/auto-update-pyrefly-releases
Dec 3, 2026
Merged

kinto0 merged 1 commit into
mainfrom
kinto0/auto-update-pyrefly-releases

Conversation

@kinto0

@kinto0 kinto0 commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor
  • What: a workflow that runs daily, adds every stable Pyrefly release newer than
    the newest entry in pyrefly/private/versions.bzl, and commits the change to
    main. It reads the SHA-256 values from the GitHub release asset digests and
    adds a CHANGELOG entry.
  • Why: each Pyrefly release needed a manual versions.bzl update.
  • Why it needs no secrets or settings: it polls the public releases API, and it
    pushes with GITHUB_TOKEN (main has no branch protection). A push made with
    GITHUB_TOKEN does not start CI, so the workflow then starts ci.yml on main with
    workflow_dispatch, the one event that GITHUB_TOKEN can trigger.

Test plan

  • Unit tests: python -m unittest discover -s tests -p "test_*.py" (9 pass).
  • Ran this workflow from a temporary branch, with main replaced by a scratch branch kinto0/tmp-test-target:
    • The script printed Added Pyrefly releases: 1.5.2.
    • It pushed commit 2b76267 "Add Pyrefly 1.5.2" by github-actions[bot], changing only CHANGELOG.md and pyrefly/private/versions.bzl.
    • It started CI on that commit with workflow_dispatch; all 7 jobs passed (run 47206981533).
  • Scratch branches deleted.

@meta-cla meta-cla Bot added the cla signed label Dec 3, 2026
@kinto0
kinto0 force-pushed the kinto0/auto-update-pyrefly-releases branch 5 times, most recently from 8b25b21 to 5cd02ad Compare December 3, 2026 21:19
- What: a workflow that runs daily, adds every stable Pyrefly release newer than
  the newest entry in pyrefly/private/versions.bzl, and commits the change to
  main. It reads the SHA-256 values from the GitHub release asset digests and
  adds a CHANGELOG entry.
- Why: each Pyrefly release needed a manual versions.bzl update.
- Why it needs no secrets or settings: it polls the public releases API, and it
  pushes with GITHUB_TOKEN (main has no branch protection). A push made with
  GITHUB_TOKEN does not start CI, so the workflow then starts ci.yml on main with
  workflow_dispatch, the one event that GITHUB_TOKEN can trigger.
@kinto0
kinto0 force-pushed the kinto0/auto-update-pyrefly-releases branch from 5cd02ad to 8fb1d65 Compare December 3, 2026 21:28
@kinto0
kinto0 merged commit 084b587 into main Dec 3, 2026
8 checks passed
@kinto0
kinto0 deleted the kinto0/auto-update-pyrefly-releases branch December 3, 2026 21:50
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