|
| 1 | +# N|Solid release automation |
| 2 | + |
| 3 | +This document describes the GitHub Actions automation that tracks Node.js |
| 4 | +releases and prepares N|Solid release proposal pull requests. |
| 5 | + |
| 6 | +The automation is intentionally small. A releaser should be able to run it from |
| 7 | +the GitHub Actions UI by selecting only the Node.js release line. |
| 8 | + |
| 9 | +## What it does |
| 10 | + |
| 11 | +The automation has two workflows: |
| 12 | + |
| 13 | +* `Watch Node.js Releases` |
| 14 | + * runs on a schedule and can also be started manually; |
| 15 | + * reads `.github/nsolid-release-lines.json`; |
| 16 | + * checks the latest stable Node.js release for each configured line; |
| 17 | + * skips the release if an N|Solid release branch or tag already exists; |
| 18 | + * creates or reuses a tracking issue; |
| 19 | + * attempts to create the release proposal. |
| 20 | +* `Create N|Solid Release Proposal` |
| 21 | + * is manually started with one input: `node-line`; |
| 22 | + * finds the latest stable Node.js tag for that line; |
| 23 | + * checks out `node-v<line>.x-nsolid-v6.x`; |
| 24 | + * reads the current N|Solid version from `src/node_version.h`; |
| 25 | + * creates `node-vX.Y.Z-nsolid-vA.B.C-release`; |
| 26 | + * merges the upstream Node.js tag; |
| 27 | + * sets `NSOLID_VERSION_IS_RELEASE` to `1`; |
| 28 | + * prepends the N|Solid changelog entry; |
| 29 | + * pushes the release branch; |
| 30 | + * opens a draft release PR. |
| 31 | + |
| 32 | +If the Node.js tag merge conflicts, the workflow stops, comments on the |
| 33 | +tracking issue when one exists, and uploads `nsolid-release-conflicts.md` as an |
| 34 | +artifact. |
| 35 | + |
| 36 | +The automation does not create a release tag. Release tags should still be |
| 37 | +created by the releaser after the proposal is reviewed. |
| 38 | + |
| 39 | +## Supported release lines |
| 40 | + |
| 41 | +The supported lines are configured in `.github/nsolid-release-lines.json`: |
| 42 | + |
| 43 | +```json |
| 44 | +{ |
| 45 | + "nodeReleaseLines": [22, 24] |
| 46 | +} |
| 47 | +``` |
| 48 | + |
| 49 | +Only lines listed there are watched by the scheduled workflow and shown in the |
| 50 | +manual workflow selector. |
| 51 | + |
| 52 | +## Add a release line |
| 53 | + |
| 54 | +When N|Solid starts supporting a new Node.js release line: |
| 55 | + |
| 56 | +1. Add the major version to `.github/nsolid-release-lines.json`. |
| 57 | +2. Add the same value to the `node-line` options in |
| 58 | + `.github/workflows/create-nsolid-release-proposal.yml`. |
| 59 | +3. Ensure the base branch exists: |
| 60 | + `node-v<line>.x-nsolid-v6.x`. |
| 61 | +4. Ensure the N|Solid changelog exists: |
| 62 | + `doc/changelogs/NSOLID_CHANGELOG_V6_NODE_V<line>.md`. |
| 63 | +5. Run the workflow manually once for that line. |
| 64 | + |
| 65 | +For example, to add Node.js v26 support, add `26` to the JSON file and add |
| 66 | +`'26'` to the workflow options. |
| 67 | + |
| 68 | +## Remove a release line |
| 69 | + |
| 70 | +When N|Solid stops supporting a Node.js release line: |
| 71 | + |
| 72 | +1. Remove the major version from `.github/nsolid-release-lines.json`. |
| 73 | +2. Remove the same value from the `node-line` options in |
| 74 | + `.github/workflows/create-nsolid-release-proposal.yml`. |
| 75 | + |
| 76 | +Do not delete existing release branches, tags, or changelog files as part of |
| 77 | +removing the line from automation. |
| 78 | + |
| 79 | +## Manual use |
| 80 | + |
| 81 | +To prepare a release proposal manually: |
| 82 | + |
| 83 | +1. Open the `Create N|Solid Release Proposal` workflow. |
| 84 | +2. Select the Node.js release line. |
| 85 | +3. Run the workflow. |
| 86 | + |
| 87 | +The workflow always uses the latest stable Node.js release for the selected |
| 88 | +line. If a different upstream tag is required, prepare the release manually. |
| 89 | + |
| 90 | +## Failure handling |
| 91 | + |
| 92 | +If the release branch already exists and has an open PR, the workflow reuses the |
| 93 | +existing PR. If the release branch exists without an open PR, the workflow fails |
| 94 | +so a releaser can inspect the branch before opening a PR manually. |
| 95 | + |
| 96 | +If the workflow fails with merge conflicts: |
| 97 | + |
| 98 | +1. Open the workflow artifact named `nsolid-release-conflicts`. |
| 99 | +2. Resolve the listed conflicts locally from the generated release branch steps. |
| 100 | +3. Continue the release manually. |
| 101 | + |
| 102 | +If the workflow fails while creating the PR, the release branch may already have |
| 103 | +been pushed. Open the PR manually using the branch named in the workflow logs. |
0 commit comments