-
Notifications
You must be signed in to change notification settings - Fork 31
Creating a Version 1.x Release
WARNING THIS PAGE IS CURRENTLY UNDER CONSTRUCTION.
Because we use the main
branch for version 2.x development, new releases of the TestCentric 1.x GUI use the v1-build
branch. All feature branches intended for release in the 1.x series are created from v1-build
and are eventually merged back to that branch.
This page describes how we create a new 1.x release of the TestCentric GUI starting at the point where all issues to be included in the release have been closed and merged to v1-build
. The current code in v1-build
serves as the basis for the release.
UNDER CONSTRUCTION
In order to begin the release process, there should already be a milestone named for the release, like 1.7.0
. The milestone name is required to be the same as the release package version, with three components. Our scripts depend on this.
All closed and merged issues to be included in the release must be part of the milestone. Any remaining open issues should be transferred to the next milestone before beginning this process, since the milestone will eventually be closed by the script.
The milestone description will appear in the release that is created on GitHub. You should edit it to describe the release in general. Start the description with a blank line to separate it from generated text that will precede it in the release notes.
NOTE: This process does not yet support pre-releases, like
1.5.0-beta2
. Such releases would have to be done manually.
We use a release branch to isolate the process of creating the release from more substantive changes like bug fixes and new features. Ideally, you should leave the v1-build
branch unchanged from the time the release branch is created until the new release is published in order to avoid a merge conflict later in the process. This is generally not a problem because the release process takes very little time.
-
Create a new local branch named "release-{milestone}", like
release-1.7.0
. -
Make any changes needed for the release, add and commit them. Normally, no changes are needed. Any change of significance should have been done in a PR before starting the process.
-
Commit your changes and push the new branch, for example:
git push -u origin release-1.7.0
. An AppVeyor build is triggered. In case of failure, fix and repeat until it is successful. -
The AppVeyor build creates a draft release on GitHub. Check it to see that all closed issues appear and that the text is correct. No assets have been added to the draft release at this point.
-
Immediately edit the draft release online so it will create the release label on the
v1-build
branch rather than the defaultmain
branch. -
If necessary, repeat steps 2 through 5 on the release branch until everything is correct.
NOTE: If you update the milestone but don't make any local changes, you don't need to do a new push. Instead, use the AppVeyor menu option to re-run the same commit.
- As a final step before merging the release branch into
v1-branch
, you may edit the draft release text in any way you like. This is useful only if you want something to appear in the release notes but not in the milestone.
-
Create a PR for the release branch. Change the target for the merge from
main
tov1-build
before saving it. -
Wait for the CI build to complete successfully and then merge it. This will trigger a new build and produce a
dev
release on MyGet. Thev1-build
branch now has all the changes from the release branch. -
Go to the draft release on GitHub and click Publish. This will tag the release on
v1-build
and trigger a final production build. -
The production build uploads all packages to NuGet and Chocolatey and adds them as assets on the GitHub release. The milestone is closed and all the issues have comments added indicating the release in which they were resolved.
-
Update the Release Notes on the website.
-
Notify users of the new release.
Prior to publishing the release, errors are handled in the normal way. Changes may be made to the local branch and pushed until the errors are corrected. Errors in the publishing step require special handling because publishing affects multiple external sites.
The build triggered by clicking the Publish button in GitHub runs the usual Build, Test and Package steps first. These should not cause any errors since the code is unchanged from earlier builds.
Next the build publishes packages to MyGet, NuGet and Chocolatey and creates the Production release on GitHub. Generally, errors can occur at any of these steps, usually due to security or network problems.
No publication has occurred, so correct the problem and rerun.
One or more packages may have been published to MyGet. However, MyGet does not fail if you try to push a package version which has already been published. You may correct the problem and rerun.
Packages may have been published to NuGet, which does not handle re-publication well. You must run Chocolatey publication and the GitHub release separately.
Packages have been published already. You must run the GitHub production release step separately.
Recovery requires doing a local build, which exactly matches the build being published. This manual process is fragile but is the only one we have at this time. If in doubt, ask another team member for help.
Change to the v1-build
branch on your local machine. Since all changes have already been merged, you may pull
them to your machine. The build script needs to be run locally.
- Do
build -t CleanAll
just to be sure that any leftover results are cleared out. - Do
build -t BuildTestAndPackage
to ensure that everything is working. - If you need to publish to NuGet or Chocolatey, edit the
PublishPackages
task inbuild.cake
. Comment out theif
clauses for the steps you do not want to run, i.e. those which already succeeded. Dobuild -t PublishPackages
. Immediately after this succeeds, back out your edits.
NOTE: Yes, this is lame. We need to have separate targets for MyGet, NuGet and Chocolatey. Coming soon!
- Do
build -t CreateProductionRelease
to perform the release on GitHub.
-
This process does not yet support milestones with a pre-release suffix, like 1.5.0-beta2. This will be a future enhancement.
-
The CHANGES.txt file must currently be updated manually.
-
The Release Notes on the website must currently be updated manually.
-
User notification is currently manual.
Copyright (c) 2018-2023 Charlie Poole