add new patch release process

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2025-11-20 11:44:26 +01:00
parent 69c19609f7
commit fb5c157262
7 changed files with 616 additions and 15 deletions
+16
View File
@@ -0,0 +1,16 @@
# Patch Release Process
This directory tracks patches to be applied to the next patch release. It contains a list of patch files of the format `pr-<number>.txt` that define which pull requests should be included in the next patch release, where the content of the file is the description of the fix.
The [sync_patch-release.yml](/.github/workflows/sync_patch-release.yml) workflow will automatically create a "Patch Release" PR with the patches in this directory.
## Usage
To add a PR to the set of patches, run `yarn patch-pr <pr-number> <description>` in the root of the repository.
## GitHub Workflow
A GitHub workflow automatically keeps a "Patch Release" PR in sync with the patches listed in this directory. When you add, modify, or remove patch files, the workflow will:
- Update the existing PR if patch files exist
- Close and delete the PR branch if no patch files exist
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const prNumber = process.argv[2];
const description = process.argv.slice(3).join(' ');
if (!prNumber || !description) {
console.error('Usage: yarn patch-pr <pr-number> <description>');
process.exit(1);
}
const patchFilePath = path.join(__dirname, `pr-${prNumber}.txt`);
fs.writeFileSync(patchFilePath, description);