From 6fc6375bcdf8649232747a4adabfd1b2ec3e2e03 Mon Sep 17 00:00:00 2001 From: josetr <37419832+josetr@users.noreply.github.com> Date: Fri, 11 Mar 2022 03:10:08 +0000 Subject: [PATCH] Use Nerdbank.GitVersioning --- .github/workflows/main.yml | 15 +++++++++++++++ Directory.Build.props | 5 ++++- version.json | 8 ++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 version.json diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7a93fb22d6..711b49368b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,6 +24,16 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: '0' + + - name: Install nbgv + if: startsWith(matrix.config.os, 'macos') + run: | + dotnet tool install -g nbgv + + - name: Set version + run: nbgv cloud --all-vars - name: Environment if: matrix.config.vs @@ -72,6 +82,11 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: '0' + + - name: Set version + run: nbgv cloud --all-vars - uses: actions/download-artifact@v2 with: diff --git a/Directory.Build.props b/Directory.Build.props index 9ab8826efd..f5820fef6c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -11,7 +11,10 @@ $(GITHUB_SHA) João Matos, Dimitar Dobrev, Jose Torres João Matos, Dimitar Dobrev - 0.10.6 + $(NBGV_Version) + $(NBGV_AssemblyVersion) + $(NBGV_AssemblyFileVersion) + $(NBGV_AssemblyInformationalVersion) false $(RootDir)build\ $(BuildDir)obj\ diff --git a/version.json b/version.json new file mode 100644 index 0000000000..0ea35b1b9c --- /dev/null +++ b/version.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", + "version": "1.0", + "publicReleaseRefSpec": [ + "^refs/heads/master$", + "^refs/tags/v\\d\\.\\d" + ] +}