75 Commits

Author SHA1 Message Date
dependabot[bot]
7077a451c2 Bump webpack-cli from 4.3.0 to 4.3.1
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.3.0...webpack-cli@4.3.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-05 18:15:28 +01:00
dependabot[bot]
6ac083e814 Bump ts-loader from 8.0.12 to 8.0.13
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 8.0.12 to 8.0.13.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v8.0.12...v8.0.13)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-05 18:14:59 +01:00
dependabot[bot]
3cebe1af29 Bump @types/node from 14.14.17 to 14.14.20
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.17 to 14.14.20.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-05 18:14:32 +01:00
Lazaro
0e4a66de68 Update new color icon. 2021-01-05 18:13:44 +01:00
Lazaro
aabbfd473b Update new color icon. 2021-01-05 18:13:44 +01:00
Lazaro
0674a52456 Update new color icon. 2021-01-05 18:13:44 +01:00
Lazaro
c796da950c Update new color icon. 2021-01-05 18:13:44 +01:00
dependabot[bot]
b8f9f37f16 Bump webpack from 5.11.0 to 5.11.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.11.0 to 5.11.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.11.0...v5.11.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-31 12:35:45 +01:00
dependabot[bot]
2303858797 Bump @types/node from 14.14.14 to 14.14.17
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.14 to 14.14.17.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-31 12:32:34 +01:00
dependabot[bot]
57796af8bc Bump webpack-cli from 4.2.0 to 4.3.0
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.2.0...webpack-cli@4.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-31 12:32:14 +01:00
dependabot[bot]
e78519b3bd Bump @types/node from 14.14.13 to 14.14.14
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.13 to 14.14.14.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-22 11:39:36 +01:00
dependabot[bot]
a3922ba505 Bump webpack from 5.10.1 to 5.11.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.10.1 to 5.11.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.10.1...v5.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-22 11:39:06 +01:00
Artur
38d0dcd8ed Updated dist files 2020-12-22 11:32:34 +01:00
Artur
774f588a83 disable dotnet tool showing logo 2020-12-22 11:31:48 +01:00
dependabot[bot]
941d214e6a Bump typescript from 4.1.2 to 4.1.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 09:58:36 +01:00
dependabot[bot]
50a657f628 Bump webpack from 5.10.0 to 5.10.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.10.0...v5.10.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 09:55:12 +01:00
dependabot[bot]
b2a97a5d32 Bump @types/node from 14.14.12 to 14.14.13
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.12 to 14.14.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 09:54:59 +01:00
dependabot[bot]
fe418bc8f9 Bump azure-pipelines-task-lib from 2.11.4 to 2.12.0
Bumps [azure-pipelines-task-lib](https://github.com/Microsoft/azure-pipelines-task-lib) from 2.11.4 to 2.12.0.
- [Release notes](https://github.com/Microsoft/azure-pipelines-task-lib/releases)
- [Commits](https://github.com/Microsoft/azure-pipelines-task-lib/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 09:54:35 +01:00
dependabot[bot]
a03a71f5b9 Bump ts-loader from 8.0.11 to 8.0.12
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 8.0.11 to 8.0.12.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v8.0.11...v8.0.12)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 09:53:56 +01:00
dependabot[bot]
3fee7a63b8 Bump @types/node from 14.14.11 to 14.14.12
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.11 to 14.14.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-11 06:46:46 +01:00
dependabot[bot]
e0bb3399e3 Bump inversify from 5.0.1 to 5.0.5
Bumps [inversify](https://github.com/inversify/InversifyJS) from 5.0.1 to 5.0.5.
- [Release notes](https://github.com/inversify/InversifyJS/releases)
- [Changelog](https://github.com/inversify/InversifyJS/blob/master/CHANGELOG.md)
- [Commits](https://github.com/inversify/InversifyJS/compare/5.0.1...5.0.5)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-10 08:09:01 +01:00
dependabot[bot]
c03aad052d Bump uuid from 8.3.1 to 8.3.2
Bumps [uuid](https://github.com/uuidjs/uuid) from 8.3.1 to 8.3.2.
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-09 11:01:03 +01:00
dependabot[bot]
e0cf9ee6df Bump @types/node from 14.14.10 to 14.14.11
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.10 to 14.14.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-09 11:00:41 +01:00
dependabot[bot]
8688d41edf Bump webpack from 5.9.0 to 5.10.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.9.0 to 5.10.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.9.0...v5.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-07 09:10:37 +01:00
dependabot[bot]
3e24dc8cc8 Bump azure-pipelines-task-lib from 2.11.3 to 2.11.4
Bumps [azure-pipelines-task-lib](https://github.com/Microsoft/azure-pipelines-task-lib) from 2.11.3 to 2.11.4.
- [Release notes](https://github.com/Microsoft/azure-pipelines-task-lib/releases)
- [Commits](https://github.com/Microsoft/azure-pipelines-task-lib/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-04 08:44:15 +01:00
dependabot[bot]
3802a495ed Bump webpack from 5.6.0 to 5.9.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.6.0 to 5.9.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.6.0...v5.9.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-30 08:37:35 +01:00
dependabot[bot]
4ec6a001cc Bump prettier from 2.2.0 to 2.2.1
Bumps [prettier](https://github.com/prettier/prettier) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.2.0...2.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-30 08:37:04 +01:00
dependabot[bot]
b9716b3284 Bump @types/node from 14.14.9 to 14.14.10
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.9 to 14.14.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-26 07:28:10 +01:00
Chris Davis
72d71e3825 Bump action versions in GitHub Action examples 2020-11-23 18:20:44 +01:00
Artur
12703e7f24 Update README.md 2020-11-23 11:11:15 +01:00
Chris Davis
62f943a7b7 Improve opening description in README. 2020-11-23 11:08:04 +01:00
Chris Davis
0b2f796e4d Align GitHub Action name with Azure Pipelines extension 2020-11-23 11:08:04 +01:00
Chris Davis
e971e77318 Remove setting useConfigFile input
Removed the setting of the 'useConfigFile' input in example 2 as the input now has the correct default set.
2020-11-23 11:04:19 +01:00
Chris Davis
b925f8e478 Fix configFilePath default 2020-11-23 11:04:19 +01:00
Chris Davis
a33003e772 Improve GitVersion examples
Improved the GitVersion examples by using headings for the examples (with links) and fixing a couple of typos.
2020-11-23 11:04:19 +01:00
Artur
a448a9f0a2 fix the description length of the github actions (should be less than 125 chars) 2020-11-22 11:38:23 +01:00
Artur
2d2c6d300f Updated dist files 2020-11-22 11:29:31 +01:00
Chris Davis
f9651f49f0 Fix spelling of omitted. 2020-11-22 11:26:41 +01:00
Chris Davis
4c753ece22 Add missing outputs to GitHub action. 2020-11-22 11:26:41 +01:00
Chris Davis
3de8a57a92 Add GitHub release badge to README.
Also changed the logo for the Azure Pipelines task to the Azure Pipelines logo.
2020-11-22 11:26:41 +01:00
Chris Davis
18efce22d9 Align Azure Pipelines examples with GitHub Actions examples. 2020-11-22 11:26:41 +01:00
Chris Davis
4ace268ae2 Add GitHub Actions usage examples. 2020-11-22 11:26:41 +01:00
Artur
6a7df9e3f1 Updated dist files 2020-11-20 14:46:31 +01:00
Benjamin Van Brussel
a7fd499098 Removed the path.join on srcDir and targetPath in order to fix absolute path 2020-11-20 14:41:53 +01:00
Artur
b55b3344de Updated dist files 2020-11-20 13:47:16 +01:00
Chris Davis
965ad03650 Improve reference to config file with default name 2020-11-20 13:28:50 +01:00
Chris Davis
9a35a04f4c Added setup and execute task examples. 2020-11-20 13:28:50 +01:00
Chris Davis
b7cd8c7635 Added screenshots for example Azure Pipelines run for setup and execute tasks. 2020-11-20 13:28:50 +01:00
Chris Davis
936c2a5f80 Corrected spelling of Azure Pipelines. 2020-11-20 13:28:50 +01:00
Chris Davis
f9e93cf489 Made images folder addressable so the images can be referenced from the content files (i.e. overview.md) file. 2020-11-20 13:28:50 +01:00
Chris Davis
246501445f Moved images referenced in overview.md back to images folder and added to extension files. 2020-11-20 13:28:50 +01:00
Chris Davis
5576f1f4f3 Moved _icon.png_ back to **images** folder. 2020-11-20 13:28:50 +01:00
Chris Davis
4b8e1b04eb - Renamed images folder to screenshots.
- Used relative path in _overview.md_ file.
2020-11-20 13:28:50 +01:00
chrisd
f6df8a60a7 Update vss-extension.json
Correct indentation.
2020-11-20 13:28:50 +01:00
chrisd
6eb9c9d972 Update vss-extension.json
Updated to reference new images.
2020-11-20 13:28:50 +01:00
chrisd
e72a3b732f Update overview.md
Updated the overview with new Azure Pipelines images.
2020-11-20 13:28:50 +01:00
chrisd
512189b67e Delete build-task.png 2020-11-20 13:28:50 +01:00
chrisd
04dabe3db9 Add Azure Pipelines pipeline editor task images. 2020-11-20 13:28:50 +01:00
dependabot[bot]
a5bd3bccab Bump typescript from 4.0.5 to 4.1.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.5 to 4.1.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.5...v4.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-20 09:33:50 +01:00
dependabot[bot]
ace779fa65 Bump prettier from 2.1.2 to 2.2.0
Bumps [prettier](https://github.com/prettier/prettier) from 2.1.2 to 2.2.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.1.2...2.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-20 09:27:28 +01:00
dependabot[bot]
e36b091f69 Bump @types/node from 14.14.8 to 14.14.9
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.8 to 14.14.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-20 09:27:15 +01:00
dependabot[bot]
0f5d09ce56 Bump webpack from 5.5.1 to 5.6.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.5.1 to 5.6.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.5.1...v5.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-20 09:26:57 +01:00
dependabot[bot]
ae681f57e6 Bump webpack from 5.5.0 to 5.5.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.5.0 to 5.5.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.5.0...v5.5.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-19 07:21:51 +01:00
dependabot[bot]
26360d9b0f Bump @types/node from 14.14.7 to 14.14.8
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.7 to 14.14.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-18 20:54:59 +01:00
dependabot[bot]
c4fd6f73e9 Bump webpack from 5.4.0 to 5.5.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.4.0...v5.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-18 08:26:16 +01:00
dependabot[bot]
b3e9769761 Bump @actions/tool-cache from 1.6.0 to 1.6.1
Bumps [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/tool-cache)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 07:41:23 +01:00
Rory Primrose
d08937d559 Update index.md
Updated version usage
2020-11-15 23:57:18 +01:00
Rory Primrose
3ae78bd823 Update GitHub actions usage documentation 2020-11-15 23:57:18 +01:00
Artur Stolear
d7bba81943 fix arguments parsing 2020-11-11 14:51:33 +01:00
dependabot[bot]
302eb63bc1 Bump @types/node from 14.14.6 to 14.14.7
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.6 to 14.14.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-10 07:56:27 +01:00
dependabot[bot]
4c0ce0e112 Bump ts-loader from 8.0.10 to 8.0.11
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 8.0.10 to 8.0.11.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v8.0.10...v8.0.11)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-10 07:56:18 +01:00
Artur Stolear
a7224f5869 Updated dist files 2020-11-09 09:29:51 +01:00
dependabot[bot]
00d67e69f0 Bump typed-rest-client from 1.7.3 to 1.8.0
Bumps [typed-rest-client](https://github.com/Microsoft/typed-rest-client) from 1.7.3 to 1.8.0.
- [Release notes](https://github.com/Microsoft/typed-rest-client/releases)
- [Commits](https://github.com/Microsoft/typed-rest-client/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-09 08:33:35 +01:00
dependabot[bot]
6ef8699cb2 Bump ts-loader from 8.0.9 to 8.0.10
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 8.0.9 to 8.0.10.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v8.0.9...v8.0.10)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-09 08:32:54 +01:00
dependabot[bot]
1c12327cd0 Bump terser-webpack-plugin from 4.2.3 to 5.0.3
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 4.2.3 to 5.0.3.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v4.2.3...v5.0.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-09 08:32:28 +01:00
55 changed files with 4621 additions and 19791 deletions

View File

@@ -2,13 +2,15 @@
![GitTools](docs/icon.png "GitTools")
GitHub Actions that allow to install and use the [GitVersion](https://github.com/GitTools/GitVersion) and [GitReleaseManager](https://github.com/GitTools/GitReleaseManager) tools
GitHub Actions that allow the setup and use of the [GitVersion](https://github.com/GitTools/GitVersion) and [GitReleaseManager](https://github.com/GitTools/GitReleaseManager) tools.
[![Build Status](https://github.com/GitTools/actions/workflows/CI/badge.svg)](https://github.com/GitTools/actions/actions)
[![Build Status](https://github.com/GitTools/actions/workflows/release/badge.svg)](https://github.com/GitTools/actions/actions)
[![Azure Pipeline Task](https://img.shields.io/badge/marketplace-gittools.gittools-blue?logo=visual-studio)](https://marketplace.visualstudio.com/items?itemName=gittools.gittools)
[![Github Action](https://img.shields.io/badge/marketplace-use--actions-blue?logo=github)](https://github.com/marketplace/actions/use-actions)
[![GitHub Release](https://img.shields.io/github/v/release/gittools/actions?logo=github&sort=semver)](https://github.com/GitTools/actions/releases/latest)
[![Azure Pipelines Task](https://img.shields.io/badge/marketplace-gittools.gittools-blue?logo=azure-pipelines)](https://marketplace.visualstudio.com/items?itemName=gittools.gittools)
[![Github Action](https://img.shields.io/badge/marketplace-gittools-blue?logo=github)](https://github.com/marketplace/actions/gittools)
## Usage
@@ -17,11 +19,11 @@ GitHub Actions that allow to install and use the [GitVersion](https://github.com
Examples for usage of **GitVersion**:
- [GitHub Actions](docs/examples/github/gitversion/index.md)
- [Azure Pipeline tasks](docs/examples/azure/gitversion/index.md)
- [Azure Pipelines tasks](docs/examples/azure/gitversion/index.md)
### GitReleaseManager
Examples for usage of **GitReleaseManager**:
- [GitHub Actions](docs/examples/github/gitreleasemanager/index.md)
- [Azure Pipeline tasks](docs/examples/azure/gitreleasemanager/index.md)
- [Azure Pipelines tasks](docs/examples/azure/gitreleasemanager/index.md)

View File

@@ -1,18 +1,9 @@
name: use-actions
description: GitHub Action for Easy Semantic Versioning with GitVersion. Installs the specific version of GitVersion.Tool
name: GitTools
description: Build tasks for easy semantic versioning for projects using Git and release management.
author: GitTools
branding:
color: gray-dark
icon: git-pull-request
inputs:
versionSpec:
description: Required version in the form of 5.x or exact version like 5.0.0
required: true
default: ''
includePrerelease:
description: Include pre-release versions when matching a version
required: false
default: false
runs:
using: node12
main: dist/github/setup/index.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -2,5 +2,10 @@ Versioning when using Git, solved. GitVersion looks at your Git history and work
It works with most branching strategies but has been designed mainly around GitFlow and GitHubFlow (pull request workflow). The calculated version numbers can then be accessed through variables such as `$(GitVersion.NuGetVersion)` and `$(GitVersion.SemVer)`. It is also very configurable to allow it to work with most release workflows!
![Build Task](https://raw.githubusercontent.com/GitTools/actions/master/dist/azure/images/build-task.png)
![Builds](https://raw.githubusercontent.com/GitTools/actions/master/dist/azure/images/builds.png)
## Azure Pipelines tasks
![Azure Pipelines Tasks](images/pipeline-editor-tasks.png)
## Azure Pipelines run examples
![Azure Pipelines Runs](images/builds.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@@ -19,7 +19,8 @@
{ "path": "gitreleasemanager/close" },
{ "path": "gitreleasemanager/open" },
{ "path": "gitreleasemanager/publish" },
{ "path": "gitreleasemanager/addasset" }
{ "path": "gitreleasemanager/addasset" },
{ "path": "images", "addressable": true }
],
"categories": [
"Azure Pipelines"
@@ -55,11 +56,18 @@
"uri": "https://github.com/GitTools/actions/issues"
}
},
"screenshots": [{
"path": "images/builds.png"
"screenshots": [
{
"path": "screenshots/pipeline-editor-setup-gitversion-task.png"
},
{
"path": "images/build-task.png"
"path": "screenshots/pipeline-run-setup-gitversion-task.png"
},
{
"path": "screenshots/pipeline-editor-execute-gitversion-task.png"
},
{
"path": "screenshots/pipeline-run-execute-gitversion-task.png"
}
],
"content": {
@@ -149,4 +157,4 @@
"name": "gitreleasemanager/addasset"
}
}]
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,299 @@
# Execute GitVersion Task (gitversion/execute) Usage Examples
Find out how to use the **gitversion/execute** task using the examples below.
> The examples use the latest _0.x_ version of the GitVersion Execute task. It is recommended to use the latest released version in your own pipelines.
## Inputs
The Execute GitVersion task accepts the following inputs:
```yaml
targetPath:
description: Optionally supply the path to the working directory.
required: false
default: ''
useConfigFile:
description: Whether to use a custom configuration file.
required: false
default: false
configFilePath:
description: Optional path to config file (defaults to GitVersion.yml).
required: false
default: ''
updateAssemblyInfo:
description: Whether to update versions in the AssemblyInfo files.
required: false
default: false
updateAssemblyInfoFilename:
description: Update versions in specified file.
required: false
default: ''
additionalArguments:
description: Additional arguments to send to GitVersion.
required: false
default: ''
```
## Outputs
The Execute GitVersion task creates the following job-scoped variables and multi-job output variables:
- GitVersion.Major
- GitVersion.Minor
- GitVersion.Patch
- GitVersion.PreReleaseTag
- GitVersion.PreReleaseTagWithDash
- GitVersion.PreReleaseLabel
- GitVersion.PreReleaseNumber
- GitVersion.WeightedPreReleaseNumber
- GitVersion.BuildMetaData
- GitVersion.BuildMetaDataPadded
- GitVersion.FullBuildMetaData
- GitVersion.MajorMinorPatch
- GitVersion.SemVer
- GitVersion.LegacySemVer
- GitVersion.LegacySemVerPadded
- GitVersion.AssemblySemVer
- GitVersion.AssemblySemFileVer
- GitVersion.FullSemVer
- GitVersion.InformationalVersion
- GitVersion.BranchName
- GitVersion.EscapedBranchName (since 5.2.0)
- GitVersion.Sha
- GitVersion.ShortSha
- GitVersion.NuGetVersionV2
- GitVersion.NuGetVersion
- GitVersion.NuGetPreReleaseTagV2
- GitVersion.NuGetPreReleaseTag
- GitVersion.VersionSourceSha
- GitVersion.CommitsSinceVersionSource
- GitVersion.CommitsSinceVersionSourcePadded (since 5.2.0)
- GitVersion.UncommittedChanges (since 5.5.0)
- GitVersion.CommitDate
The job-scoped variables can be accessed using the macro syntax `$(GitVersion.<variableName>)` in subsequent steps in the same job. Azure Pipelines also creates environment variables of the form `GITVERSION_<VARIABLENAME>`. See examples [5](#example-5) and [6](#example-6).
The multi-job output variables can be accessed across jobs and stages, in both conditions and variables. See examples [7](#example-7) to [10](#example-10).
**GitVersion also automatically updates the pre-defined Build variable `Build.BuildNumber`.**
---
## Examples
### Example 1
Calculate the version for the build.
```yaml
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Determine Version
```
### Example 2
Calculate the version for the build using a config file with the default name **GitVersion.yml**.
```yaml
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Determine Version
inputs:
useConfigFile: true
```
Example contents of **GitVersion.yml**:
```yaml
mode: Mainline
branches:
master:
regex: ^latest$
pull-request:
tag: pr
```
### Example 3
Calculate the version for the build using a config file named **VersionConfig.yml** in the root of the working folder.
```yaml
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Determine Version
inputs:
useConfigFile: true
configFilePath: 'VersionConfig.yml'
```
### Example 4
Show the effective configuration for GitVersion by running the **/showConfig** command (passed as an additional argument).
```yaml
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Display GitVersion config
inputs:
additionalArguments: '/showConfig'
```
### Example 5
Calculate the version for the build and display all the calculated variables in the next step.
```yaml
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Determine Version
- script: |
echo Major: $(GitVersion.Major)
echo Minor: $(GitVersion.Minor)
echo Patch: $(GitVersion.Patch)
echo PreReleaseTag: $(GitVersion.PreReleaseTag)
echo PreReleaseTagWithDash: $(GitVersion.PreReleaseTagWithDash)
echo PreReleaseLabel: $(GitVersion.PreReleaseLabel)
echo PreReleaseNumber: $(GitVersion.PreReleaseNumber)
echo WeightedPreReleaseNumber: $(GitVersion.WeightedPreReleaseNumber)
echo BuildMetaData: $(GitVersion.BuildMetaData)
echo BuildMetaDataPadded: $(GitVersion.BuildMetaDataPadded)
echo FullBuildMetaData: $(GitVersion.FullBuildMetaData)
echo MajorMinorPatch: $(GitVersion.MajorMinorPatch)
echo SemVer: $(GitVersion.SemVer)
echo LegacySemVer: $(GitVersion.LegacySemVer)
echo LegacySemVerPadded: $(GitVersion.LegacySemVerPadded)
echo AssemblySemVer: $(GitVersion.AssemblySemVer)
echo AssemblySemFileVer: $(GitVersion.AssemblySemFileVer)
echo FullSemVer: $(GitVersion.FullSemVer)
echo InformationalVersion: $(GitVersion.InformationalVersion)
echo BranchName: $(GitVersion.BranchName)
echo EscapedBranchName: $(GitVersion.EscapedBranchName)
echo Sha: $(GitVersion.Sha)
echo ShortSha: $(GitVersion.ShortSha)
echo NuGetVersionV2: $(GitVersion.NuGetVersionV2)
echo NuGetVersion: $(GitVersion.NuGetVersion)
echo NuGetPreReleaseTagV2: $(GitVersion.NuGetPreReleaseTagV2)
echo NuGetPreReleaseTag: $(GitVersion.NuGetPreReleaseTag)
echo VersionSourceSha: $(GitVersion.VersionSourceSha)
echo CommitsSinceVersionSource: $(GitVersion.CommitsSinceVersionSource)
echo CommitsSinceVersionSourcePadded: $(GitVersion.CommitsSinceVersionSourcePadded)
echo UncommittedChanges: $(GitVersion.UncommittedChanges)
echo CommitDate: $(GitVersion.CommitDate)
```
### Example 6
Calculate the version for the build and use the `GitVersion.NuGetVersion` variable to set the NuGet package version.
```yaml
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Determine Version
- task: DotNetCoreCLI@2
displayName: Pack Example
inputs:
command: pack
packagesToPack: src/Example/LibExample.csproj
versioningScheme: byEnvVar
versionEnvVar: GitVersion.NuGetVersion # alternative syntax GITVERSION_NUGETVERSION (the former gets converted into the latter internally)
```
### Example 7
Calculate the version for the build and use the `GitVersion.BranchName` variable in a condition for starting another job.
```yaml
job: CalculateVersion
displayName: Calculate version using GitVersion
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Use GitVersion
name: Version # the step MUST be named to access its output variables in another job.
job: CreateReleaseNotes
condition: and(succeeded(), eq(dependencies.CalculateVersion.outputs['Version.GitVersion.BranchName'], 'main')
dependsOn: CalculateVersion
```
### Example 8
Calculate the version for the build and map the `GitVersion.SemVer` variable into a variable in another job.
```yaml
job: CalculateVersion
displayName: Calculate version using GitVersion
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Use GitVersion
name: Version # the step MUST be named to access its output variables in another job.
job: BuildAndPack
variables:
Ver.MajorMinorPatch: $[ dependencies.CalculateVersion.outputs['Version.GitVersion.MajorMinorPatch'] ]
```
### Example 9
Calculate the version for the build and use the `GitVersion.Major` output variable in a condition for starting another stage.
```yaml
stages:
- stage: S1
jobs:
- job: CalculateVersion
displayName: Calculate version number using GitVersion
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Use GitVersion
name: Version # the step MUST be named to access its output variables in another stage.
- stage: S2
condition: and(succeeded(), gt(dependencies.S1.outputs['CalculateVersion.Version.GitVersion.Major'], 0))
dependsOn: S1
```
### Example 10
Calculate the version for the build and map the `GitVersion.AssemblySemVer` variable into a variable in another job for a different stage.
```yaml
stages:
- stage: S1
jobs:
- job: CalculateVersion
displayName: Calculate version number using GitVersion
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Use GitVersion
name: Version # the step MUST be named to access its output variables in another stage.
- stage: S2
dependsOn: S1
jobs:
- job: UpdateAssemblyVersions
variables:
Ver.AssemblyVer: $[ stageDependencies.S1.CalculateVersion.outputs['Version.GitVersion.AssemblySemVer'] ] # Note the 'stageDependencies.<jobName>' syntax.
```

View File

@@ -1,43 +1,11 @@
# Example
# GitVersion Tasks Usage Examples
```yaml
steps:
- task: gitversion/setup@0
displayName: Install GitVersion
inputs:
versionSpec: '5.1.3'
- task: gitversion/execute@0
displayName: Use GitVersion
- script: |
echo FullSemVer: $(fullSemVer)
echo ##vso[build.updatebuildnumber]$(fullSemVer)
echo Major: ${{ steps.gitversion.outputs.major }}
echo Minor: ${{ steps.gitversion.outputs.minor }}
echo Patch: ${{ steps.gitversion.outputs.patch }}
echo PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}
echo PreReleaseTagWithDash: ${{ steps.gitversion.outputs.preReleaseTagWithDash }}
echo PreReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}
echo PreReleaseNumber: ${{ steps.gitversion.outputs.preReleaseNumber }}
echo WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.weightedPreReleaseNumber }}
echo BuildMetaData: ${{ steps.gitversion.outputs.buildMetaData }}
echo BuildMetaDataPadded: ${{ steps.gitversion.outputs.buildMetaDataPadded }}
echo FullBuildMetaData: ${{ steps.gitversion.outputs.fullBuildMetaData }}
echo MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}
echo SemVer: ${{ steps.gitversion.outputs.semVer }}
echo LegacySemVer: ${{ steps.gitversion.outputs.legacySemVer }}
echo LegacySemVerPadded: ${{ steps.gitversion.outputs.legacySemVerPadded }}
echo AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}
echo AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}
echo InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}
echo BranchName: ${{ steps.gitversion.outputs.branchName }}
echo Sha: ${{ steps.gitversion.outputs.sha }}
echo ShortSha: ${{ steps.gitversion.outputs.shortSha }}
echo NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
echo NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}
echo NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.nuGetPreReleaseTagV2 }}
echo NuGetPreReleaseTag: ${{ steps.gitversion.outputs.nuGetPreReleaseTag }}
echo VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}
echo CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}
echo CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}
echo CommitDate: ${{ steps.gitversion.outputs.commitDate }}
```
Use the following links to see usage examples of the Setup GitVersion (**gitversion/setup**) and Execute GitVersion (**gitversion/execute**) tasks.
## Setup GitVersion (gitversion/setup)
- [Usage examples](setup/usage-examples.md)
## Execute GitVersion (gitversion/execute)
- [Usage examples](execute/usage-examples.md)

View File

@@ -0,0 +1,61 @@
# Setup GitVersion Task (gitversion/setup) Usage Examples
Find out how to use the **gitversion/setup** task using the examples below.
> The examples use the latest _0.x_ version of the GitVersion Setup task. It is recommended to use the latest released version in your own pipelines.
## Inputs
The Setup GitVersion task accepts the following inputs:
```yaml
versionSpec:
description: Required version in the form of 5.x or exact version like 5.0.0.
required: true
default: ''
includePrerelease:
description: Include pre-release versions when matching a version.
required: false
default: false
```
---
## Usage examples
### Example 1
Install the latest GitVersion 5 version.
```yaml
steps:
- task: gitversion/setup@0
displayName: Install GitVersion
inputs:
versionSpec: '5.x'
```
### Example 2
Install GitVersion 5.5.0.
```yaml
steps:
- task: gitversion/setup@0
displayName: Install GitVersion
inputs:
versionSpec: '5.5.0'
```
### Example 3
Install the latest GitVersion 6 pre-release version. For example **6.0.0-beta1.1**.
```yaml
steps:
- task: gitversion/setup@0
displayName: Install GitVersion
inputs:
versionSpec: '6.x'
includePrerelease: true
```

View File

@@ -0,0 +1,283 @@
# Execute GitVersion Action (gitversion/execute) Usage Examples
Find out how to use the **gitversion/execute** action using the examples below.
For the GitVersion workflow to execute successfully, you must checkout your Git repository with `fetch-depth: 0` to fetch all history for all tags and branches, as follows:
```yaml
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
```
This step is omitted from the examples for brevity.
> The examples use version _0.9.7_ of the GitVersion Execute action. It is recommended to use the latest released version in your own workflows.
## Inputs
The Execute GitVersion action accepts the following inputs:
```yaml
targetPath:
description: Optionally supply the path to the working directory.
required: false
default: ''
useConfigFile:
description: Whether to use a custom configuration file.
required: false
default: false
configFilePath:
description: Optional path to config file (defaults to GitVersion.yml).
required: false
default: 'GitVersion.yml'
updateAssemblyInfo:
description: Whether to update versions in the AssemblyInfo files.
required: false
default: false
updateAssemblyInfoFilename:
description: Update versions in specified file.
required: false
default: ''
additionalArguments:
description: Additional arguments to send to GitVersion.
required: false
default: ''
```
## Outputs
The Execute GitVersion action creates the following outputs:
- major
- minor
- patch
- preReleaseTag
- preReleaseTagWithDash
- preReleaseLabel
- preReleaseNumber
- weightedPreReleaseNumber
- buildMetaData
- buildMetaDataPadded
- fullBuildMetaData
- majorMinorPatch
- semVer
- legacySemVer
- legacySemVerPadded
- assemblySemVer
- assemblySemFileVer
- fullSemVer
- informationalVersion
- branchName
- escapedBranchName (since 5.2.0)
- sha
- shortSha
- nuGetVersionV2
- nuGetVersion
- nuGetPreReleaseTagV2
- nuGetPreReleaseTag
- versionSourceSha
- commitsSinceVersionSource
- commitsSinceVersionSourcePadded (since 5.2.0)
- uncommittedChanges (since 5.5.0)
- commitDate
The outputs can be accessed using the syntax `${{ steps.<id>.outputs.<outputName> }}`, where `<id>` is the ID assigned to the step that calls the action, by subsequent steps later in the same job. See example [5](#example-5).
The action also creates environment variables of the form `GITVERSION_<OUTPUTNAME>` for use by other steps in the same job. See example [6](#example-6).
The outputs can be accessed across jobs by mapping them to job outputs and referencing the job outputs using the `needs` context in dependent jobs. See examples [7](#example-7) and [8](#example-8).
---
## Examples
### Example 1
Calculate the version for the build.
```yaml
steps:
# gitversion/setup@v0.9.7 action omitted for brevity.
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0.9.7
```
### Example 2
Calculate the version for the build using a config file with the default name **GitVersion.yml**.
```yaml
steps:
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0.9.7
with:
useConfigFile: true
```
Example contents of **GitVersion.yml**:
```yaml
mode: Mainline
branches:
master:
regex: ^latest$
pull-request:
tag: pr
```
### Example 3
Calculate the version for the build using a config file named **VersionConfig.yml** in the root of the working folder.
```yaml
steps:
# gitversion/setup@v0.9.7 action omitted for brevity.
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0.9.7
with:
useConfigFile: true
configFilePath: VersionConfig.yml
```
### Example 4
Show the effective configuration for GitVersion by running the **/showConfig** command (passed as an additional argument).
```yaml
steps:
# gitversion/setup@v0.9.7 action omitted for brevity.
- name: Display GitVersion config
uses: gittools/actions/gitversion/execute@v0.9.7
with:
useConfigFile: true
additionalArguments: '/showConfig'
```
### Example 5
Calculate the version for the build and display all the calculated variables in the next step.
```yaml
steps:
# gitversion/setup@v0.9.7 action omitted for brevity.
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.7
- name: Display GitVersion outputs
run: |
echo "Major: ${{ steps.gitversion.outputs.major }}"
echo "Minor: ${{ steps.gitversion.outputs.minor }}"
echo "Patch: ${{ steps.gitversion.outputs.patch }}"
echo "PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}"
echo "PreReleaseTagWithDash: ${{ steps.gitversion.outputs.preReleaseTagWithDash }}"
echo "PreReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}"
echo "PreReleaseNumber: ${{ steps.gitversion.outputs.preReleaseNumber }}"
echo "WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.weightedPreReleaseNumber }}"
echo "BuildMetaData: ${{ steps.gitversion.outputs.buildMetaData }}"
echo "BuildMetaDataPadded: ${{ steps.gitversion.outputs.buildMetaDataPadded }}"
echo "FullBuildMetaData: ${{ steps.gitversion.outputs.fullBuildMetaData }}"
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"
echo "LegacySemVer: ${{ steps.gitversion.outputs.legacySemVer }}"
echo "LegacySemVerPadded: ${{ steps.gitversion.outputs.legacySemVerPadded }}"
echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}"
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}"
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}"
echo "BranchName: ${{ steps.gitversion.outputs.branchName }}"
echo "EscapedBranchName: ${{ steps.gitversion.outputs.escapedBranchName }}"
echo "Sha: ${{ steps.gitversion.outputs.sha }}"
echo "ShortSha: ${{ steps.gitversion.outputs.shortSha }}"
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}"
echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.nuGetPreReleaseTagV2 }}"
echo "NuGetPreReleaseTag: ${{ steps.gitversion.outputs.nuGetPreReleaseTag }}"
echo "VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}"
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}"
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}"
echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}"
echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}"
```
### Example 6
Calculate the version for the build and display the value of the `GITVERSION_SEMVER` environment variable.
```yaml
steps:
# gitversion/setup@v0.9.7 action omitted for brevity.
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0.9.7
- name: Display SemVer
run: |
echo "SemVer: $GITVERSION_SEMVER"
```
### Example 7
Calculate the version for the build and use the `branchName` output in a condition for starting another job.
```yaml
jobs:
calculate-version:
name: Calculate Version
runs-on: ubuntu-latest
outputs:
branchName: ${{ steps.gitversion.outputs.branchName }} # To use an output in another job, you have to map it to a job output.
steps:
# gitversion/execute step omitted for brevity
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.7
create-release-notes:
name: Create Release Notes
runs-on: ubuntu-latest
needs: calculate-version
if: contains(needs.calculate-version.outputs.branchName, 'main') # Output variable accessed via `needs` context.
steps:
- run: |
# Output variables can also be accessed in steps, using an expression.
echo "Creating release notes for ${{ needs.calculate-version.outputs.branchName }} branch."
```
### Example 8
Calculate the version for the build and map the `semVer` output into an environment variable in another job.
```yaml
jobs:
calculate-version:
name: Calculate Version
runs-on: ubuntu-latest
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
# gitversion/execute step omitted for brevity
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.7
display-semver:
name: Display Semantic Version
runs-on: ubuntu-latest
needs: calculate-version
env:
SEMVER: ${{ needs.calculate-version.outputs.semVer }}
steps:
- name: Display version
run: |
echo SemVer: $SEMVER
```

View File

@@ -1,50 +1,11 @@
# GitVersion
# GitVersion Actions Usage Examples
For the GitVersion workflow to execute successfully, you must checkout your Git
repository with `fetch-depth: 0` to fetch all history for all tags and branches.
Use the following links to see usage examples of the Setup GitVersion (**gitversion/setup**) and Execute GitVersion (**gitversion/execute**) actions.
```yaml
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.4
with:
versionSpec: '5.3.x'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/execute@v0.9.4
- run: |
echo "Major: ${{ steps.gitversion.outputs.major }}"
echo "Minor: ${{ steps.gitversion.outputs.minor }}"
echo "Patch: ${{ steps.gitversion.outputs.patch }}"
echo "PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}"
echo "PreReleaseTagWithDash: ${{ steps.gitversion.outputs.preReleaseTagWithDash }}"
echo "PreReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}"
echo "PreReleaseNumber: ${{ steps.gitversion.outputs.preReleaseNumber }}"
echo "WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.weightedPreReleaseNumber }}"
echo "BuildMetaData: ${{ steps.gitversion.outputs.buildMetaData }}"
echo "BuildMetaDataPadded: ${{ steps.gitversion.outputs.buildMetaDataPadded }}"
echo "FullBuildMetaData: ${{ steps.gitversion.outputs.fullBuildMetaData }}"
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"
echo "LegacySemVer: ${{ steps.gitversion.outputs.legacySemVer }}"
echo "LegacySemVerPadded: ${{ steps.gitversion.outputs.legacySemVerPadded }}"
echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}"
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}"
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}"
echo "BranchName: ${{ steps.gitversion.outputs.branchName }}"
echo "Sha: ${{ steps.gitversion.outputs.sha }}"
echo "ShortSha: ${{ steps.gitversion.outputs.shortSha }}"
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}"
echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.nuGetPreReleaseTagV2 }}"
echo "NuGetPreReleaseTag: ${{ steps.gitversion.outputs.nuGetPreReleaseTag }}"
echo "VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}"
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}"
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}"
echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}"
```
## Setup GitVersion (gitversion/setup)
- [Usage examples](setup/usage-examples.md)
## Execute GitVersion (gitversion/execute)
- [Usage examples](execute/usage-examples.md)

View File

@@ -0,0 +1,61 @@
# Setup GitVersion Action (gitversion/setup) Usage Examples
Find out how to use the **gitversion/setup** action using the examples below.
> The examples use version _0.9.7_ of the GitVersion Execute action. It is recommended to use the latest released version in your own workflows.
## Inputs
The Setup GitVersion action accepts the following inputs:
```yaml
versionSpec:
description: Required version in the form of 5.x or exact version like 5.0.0.
required: true
default: ''
includePrerelease:
description: Include pre-release versions when matching a version.
required: false
default: false
```
---
## Usage examples
### Example 1
Install the latest GitVersion 5 version.
```yaml
steps:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'
```
### Example 2
Install GitVersion 5.5.0.
```yaml
steps:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.5.0'
```
### Example 3
Install the latest GitVersion 6 pre-release version. For example **6.0.0-beta1.1**.
```yaml
steps:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '6.x'
includePrerelease: true
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -19,7 +19,7 @@ inputs:
configFilePath:
description: Optional path to config file (defaults to GitVersion.yml)
required: false
default: ''
default: 'GitVersion.yml'
updateAssemblyInfo:
description: Whether to update versions in the AssemblyInfo files
required: false
@@ -73,6 +73,8 @@ outputs:
description: 'The InformationalVersion value'
branchName:
description: 'The BranchName value'
escapedBranchName:
description: 'The EscapedBranchName value'
sha:
description: 'The Sha value'
shortSha:
@@ -91,5 +93,7 @@ outputs:
description: 'The CommitsSinceVersionSource value'
commitsSinceVersionSourcePadded:
description: 'The CommitsSinceVersionSourcePadded value'
uncommittedChanges:
description: 'The UncommittedChanges value'
commitDate:
description: 'The CommitDate value'

View File

@@ -1,5 +1,5 @@
name: gitversion-setup
description: GitHub Action for Easy Semantic Versioning with GitVersion. Installs the specific version of GitVersion.Tool
description: GitHub Action for Easy Semantic Versioning with GitVersion. Installs the specific version of GitVersion tool
author: GitTools
branding:
color: gray-dark

1014
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -29,27 +29,27 @@
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.4",
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^1.6.0",
"azure-pipelines-task-lib": "^2.11.3",
"@actions/tool-cache": "^1.6.1",
"azure-pipelines-task-lib": "^2.12.0",
"azure-pipelines-tool-lib": "^0.13.2",
"inversify": "^5.0.1",
"typed-rest-client": "^1.7.3",
"uuid": "^8.3.1"
"inversify": "^5.0.5",
"typed-rest-client": "^1.8.0",
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/node": "^14.14.6",
"@types/node": "^14.14.20",
"@types/q": "^1.5.4",
"@types/semver-compare": "^1.0.1",
"@types/uuid": "^8.3.0",
"minimist": "^1.2.5",
"prettier": "^2.1.2",
"prettier": "^2.2.1",
"reflect-metadata": "^0.1.13",
"replace-in-file-webpack-plugin": "^1.0.6",
"terser-webpack-plugin": "^4.2.3",
"terser-webpack-plugin": "^5.0.3",
"tfx-cli": "^0.8.3",
"ts-loader": "^8.0.9",
"typescript": "^4.0.5",
"webpack": "^5.4.0",
"webpack-cli": "^4.2.0"
"ts-loader": "^8.0.13",
"typescript": "^4.1.3",
"webpack": "^5.11.1",
"webpack-cli": "^4.3.1"
}
}

View File

@@ -40,7 +40,8 @@ export class DotnetTool implements IDotnetTool {
}
public disableTelemetry(): void {
this.buildAgent.exportVariable('DOTNET_CLI_TELEMETRY_OPTOUT', '1')
this.buildAgent.exportVariable('DOTNET_CLI_TELEMETRY_OPTOUT', 'true')
this.buildAgent.exportVariable('DOTNET_NOLOGO', 'true')
}
public execute(cmd: string, args: string[]): Promise<IExecResult> {

View File

@@ -26,7 +26,8 @@ export interface IGitReleaseManagerTool extends IDotnetTool {
}
@injectable()
export class GitReleaseManagerTool extends DotnetTool
export class GitReleaseManagerTool
extends DotnetTool
implements IGitReleaseManagerTool {
constructor(
@inject(TYPES.IBuildAgent) buildAgent: IBuildAgent,

View File

@@ -39,6 +39,7 @@ export interface GitVersionOutput {
FullSemVer: string
InformationalVersion: string
BranchName: string
EscapedBranchName: string
Sha: string
ShortSha: string
NuGetVersionV2: string
@@ -48,5 +49,6 @@ export interface GitVersionOutput {
VersionSourceSha: string
CommitsSinceVersionSource: number
CommitsSinceVersionSourcePadded: string
UncommittedChanges: number
CommitDate: string
}

View File

@@ -48,7 +48,7 @@ export class GitVersionTool extends DotnetTool implements IGitVersionTool {
workDir = srcDir
} else {
if (this.buildAgent.directoryExists(targetPath)) {
workDir = path.join(srcDir, targetPath)
workDir = targetPath
} else {
throw new Error('Directory not found at ' + targetPath)
}
@@ -60,7 +60,7 @@ export class GitVersionTool extends DotnetTool implements IGitVersionTool {
workDir: string,
options: GitVersionSettings
): string[] {
const args = [workDir, '/output', 'json', '/output', 'buildserver']
let args = [workDir, '/output', 'json', '/output', 'buildserver']
const {
useConfigFile,
@@ -103,8 +103,7 @@ export class GitVersionTool extends DotnetTool implements IGitVersionTool {
}
if (additionalArguments) {
//args.push(additionalArguments)
Array.prototype.push.apply(args,additionalArguments.split(' '))
args = args.concat(this.argStringToArray(additionalArguments))
}
return args
}
@@ -120,13 +119,75 @@ export class GitVersionTool extends DotnetTool implements IGitVersionTool {
})
}
private argStringToArray(argString: string): string[] {
var args: string[] = []
var inQuotes = false
var escaped = false
var lastCharWasSpace = true
var arg = ''
var append = function (c: string) {
// we only escape double quotes.
if (escaped && c !== '"') {
arg += '\\'
}
arg += c
escaped = false
}
for (var i = 0; i < argString.length; i++) {
var c = argString.charAt(i)
if (c === ' ' && !inQuotes) {
if (!lastCharWasSpace) {
args.push(arg)
arg = ''
}
lastCharWasSpace = true
continue
} else {
lastCharWasSpace = false
}
if (c === '"') {
if (!escaped) {
inQuotes = !inQuotes
} else {
append(c)
}
continue
}
if (c === '\\' && escaped) {
append(c)
continue
}
if (c === '\\' && inQuotes) {
escaped = true
continue
}
append(c)
lastCharWasSpace = false
}
if (!lastCharWasSpace) {
args.push(arg.trim())
}
return args
}
private toCamelCase(input: string): string {
return input.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, function (
match,
index
) {
if (+match === 0) return '' // or if (/\s+/.test(match)) for white spaces
return index == 0 ? match.toLowerCase() : match.toUpperCase()
})
return input.replace(
/(?:^\w|[A-Z]|\b\w|\s+)/g,
function (match, index) {
if (+match === 0) return '' // or if (/\s+/.test(match)) for white spaces
return index == 0 ? match.toLowerCase() : match.toUpperCase()
}
)
}
}