From 0b15a166fa0b7eff6e6a45ad7f75b400f5a40b5c Mon Sep 17 00:00:00 2001 From: Elena Tanasoiu Date: Wed, 15 Jun 2022 15:45:41 +0100 Subject: [PATCH] Follow guidance for git tagging in contribution docs Adding two things: - A bit more detail on how to add a tag and how to delete a badly named one - Switch to the official way of sharing tags according to the git docs[^1] [^1]: https://git-scm.com/book/en/v2/Git-Basics-Tagging --- CONTRIBUTING.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f385fb491..81e701950 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -115,15 +115,34 @@ From inside of VSCode, open the `launch.json` file and in the _Launch Integratio * Create a new commit with a message the same as the branch name. * Create a PR for this branch. * Wait for the PR to be merged into `main` -1. Trigger a release build on Actions by adding a new tag on branch `main` named after the release, as above. Note that when you push to upstream, you will need to fully qualify the ref. A command like this will work: +1. Switch to `main` and add a new tag on the `main` branch with your new version (named after the release), e.g. + ```bash + git checkout main + git tag v1.3.6 + ``` + + If you've accidentally created a badly named tag, you can delete it via + ```bash + git tag -d badly-named-tag + ``` +1. Push the new tag up: + + a. If you're using a fork of the repo: ```bash git push upstream refs/tags/v1.3.6 ``` + + b. If you're working straight in this repo: + + ```bash + git push origin refs/tags/v1.3.6 + ``` + + This will trigger [a release build](https://github.com/github/vscode-codeql/releases) on Actions. * **IMPORTANT** Make sure you are on the `main` branch and your local checkout is fully updated when you add the tag. * If you accidentally add the tag to the wrong ref, you can just force push it to the right one later. - 1. Monitor the status of the release build in the `Release` workflow in the Actions tab. 1. Download the VSIX from the draft GitHub release at the top of [the releases page](https://github.com/github/vscode-codeql/releases) that is created when the release build finishes. 1. Unzip the `.vsix` and inspect its `package.json` to make sure the version is what you expect,