🛠 Tooling: Add cancel-in-progress to release job #556
Labels
area: tooling
Managing the repository's maintenance
good first issue
Good for newcomers, please hop on!
status: accepting prs
Please, send a pull request to resolve this!
Bug Report Checklist
main
branch of the repository.Overview
Right now,
release.yml
-the workflow job that releases new versions of the package upon commits to themain
branch- is set to never cancel in-progress releases workflows:https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/d4b1c7950e8cb8886eb98aff4223079b343936a8/.github/workflows/release.yml#L1-L2
In other words: if there are two commits merged to the
main
branch quickly, they'll both have therelease
workflow run on them, in series. The second commit's workflow will wait until the first one's is done.However, the first commit's workflow will always fail if it's behind the
main
branch in terms of commits! Example from https://github.com/JoshuaKGoldberg/template-typescript-node-package/actions/runs/5292082143/jobs/9578516799:So, I think we should change the workflow to
cancel-in-progress: true
. That way, when there are multiple quick commits, on the last one's release workflow will run. And it'll release a new version with each commit's changes.Accepting PRs to make this one line change 😄. Leaving it open as a
good first issue
as it's not time-sensitive.Additional Info
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency explains concurrency.
The text was updated successfully, but these errors were encountered: