|
1 | 1 | # Test C++ Build Actions |
2 | 2 |
|
3 | 3 | This is a test project that builds a C++ one-liner on Debian and |
4 | | -on Windows via GitHub actions. |
| 4 | +on Windows via GitHub actions for projects that maintain past |
| 5 | +releases for bug fixes and minor improvements, which requires |
| 6 | +more than one active branch. |
5 | 7 |
|
6 | | -Rename the workflow file to reflect the new version, so the build |
7 | | -number is restarted. This must be done first, so previous builds |
8 | | -are not affected in Action. Version in the workflow file may be |
9 | | -updated at the same time and version in test.cpp may be updated |
10 | | -later. |
| 8 | +A GitHub run number, which is the only variable that can be used |
| 9 | +for build numbers, is restarted from `1` when the workflow file |
| 10 | +is renamed. In addition to this, GitHub requires that a workflow |
| 11 | +file existed in `main` in order to run a workflow in a branch. |
| 12 | +All this requires very careful workflow maintenance to match |
| 13 | +typical pipelines in other CI environments, such as Azure DevOps. |
| 14 | + |
| 15 | +Current layout of this test repository works for dot zero releases |
| 16 | +made from `main`, which is typical for smaller projects, or made |
| 17 | +from a dedicated release branch that is merged back into `main` |
| 18 | +*once* after the dot-zero release and then continues on its own |
| 19 | +for bug fixes and minor improvements. |
| 20 | + |
| 21 | +The `2.6.0` tag and `2.6.x` branch show the former and `2.8.0` |
| 22 | +tag and `2.8.x` branch show the latter. |
| 23 | + |
| 24 | +In this layout, past runs are shown in GitHub actions, but it |
| 25 | +is not possible to run a workflow of the past version in GitHub. |
| 26 | +That is, once `2.8.0` is released and the version is changed to |
| 27 | +the next planned one, such as `3.0.0`, there is no workflow |
| 28 | +available to build `2.8.0` in GitHub actions. This by design, |
| 29 | +so only active releases are being visible in GitHub Actions |
| 30 | +and to enforce a single set of release artifacts for a given |
| 31 | +version. |
0 commit comments