Using Github, it is possible to create releases. When doing so, a zip file of the repo is available for for download (
Then Download as Zip:
To create a tag use the git command line in a local clone of the repo:
git tag release-v1.2.3.4
git push --tags
Afterwards that tag should be visible in the branch/tags selector in Azure DevOps/TFS (you may have to refresh the page).
So what are these releases? You may ask...
Well, a Release is an automated process that takes the artifacts from a build pipeline and executes a given set of steps to deploy these artifacts to an environment.
The release depends on the artifacts generated by a build. In a build you can use the "Upload build artifact" task to create your own zip file of things you want to release. That zip file will be available from the build details in Azure DevOps/TFS.
CodePudding user response:
A GitHub "release" is just a git Tag and they create a special web page that makes special links to the build artifacts, that is all. In Azure DevOps make sure you are using the Git repository, then when you are ready to make a release just TAG the master/main branch with a semantic version (v1.2.3) and have your build pipeline start a build and create build artifacts that create zipped up files and a release.
Hint: Use GitVersion plugin to make your CI/CD life better. Use the variable GitVersion.FullSemVer
to get the semantic version. There are other variables starting with GitVersion
that are very helpful.
Another hint: In your build Trigger use refs/tags/v*
so that a build will trigger when you create a git tag starting with the letter "v".