From 7a1209b254ee3fb20de6b90e296b0fdcfff5b8d1 Mon Sep 17 00:00:00 2001 From: Alberto Spelta Date: Tue, 25 Jun 2024 17:33:44 +0200 Subject: [PATCH] [cli] Bump version 1.0 (#125) * Use AssemblyInformationalVersion as extractor version * Add create release step in release-vpax-cli.yml * Fix publicReleaseRefSpec regex in version.json * Bump version 1.0 --- .github/workflows/release-vpax-cli.yml | 12 +++++++++--- src/Dax.Vpax.CLI/Commands/ExportCommandHandler.cs | 2 +- src/Dax.Vpax.CLI/version.json | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-vpax-cli.yml b/.github/workflows/release-vpax-cli.yml index d55a8ca..fddaf6c 100644 --- a/.github/workflows/release-vpax-cli.yml +++ b/.github/workflows/release-vpax-cli.yml @@ -19,8 +19,14 @@ jobs: path: src/${{ env.PROJECT }} - name: dotnet pack run: dotnet pack 'src/${{ env.PROJECT }}/${{ env.PROJECT }}.csproj' -c Release -o . - - shell: bash - name: nuget push + - name: nuget push run: dotnet nuget push './${{ env.PROJECT }}.${{ steps.nbgv.outputs.NuGetPackageVersion }}.nupkg' -k "$NUGET_API_KEY" -s https://api.nuget.org/v3/index.json env: - NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} \ No newline at end of file + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} + - name: create release + run: | + PRERELEASE_FLAG=$([[ "${{ steps.nbgv.outputs.PrereleaseVersion }}" != "" ]] && echo "--prerelease" || echo "") + gh release create ${{ env.RELEASE_TAG }} --title ${{ env.RELEASE_TAG }} --target $GITHUB_SHA --generate-notes --draft $PRERELEASE_FLAG + env: + RELEASE_TAG: ${{ env.PROJECT }}_${{ steps.nbgv.outputs.NuGetPackageVersion }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/src/Dax.Vpax.CLI/Commands/ExportCommandHandler.cs b/src/Dax.Vpax.CLI/Commands/ExportCommandHandler.cs index f2866cb..a137d53 100644 --- a/src/Dax.Vpax.CLI/Commands/ExportCommandHandler.cs +++ b/src/Dax.Vpax.CLI/Commands/ExportCommandHandler.cs @@ -16,7 +16,7 @@ public async Task InvokeAsync(InvocationContext context) // TODO: forward cancellation token to vertipaq-analyzer extractor var cancellationToken = context.GetCancellationToken(); var extractorAppName = ThisAssembly.AssemblyName; - var extractorAppVersion = ThisAssembly.AssemblyFileVersion; + var extractorAppVersion = ThisAssembly.AssemblyInformationalVersion; var path = context.ParseResult.GetValueForArgument(PathArgument); var connectionString = context.ParseResult.GetValueForArgument(ConnectionStringArgument); diff --git a/src/Dax.Vpax.CLI/version.json b/src/Dax.Vpax.CLI/version.json index c243eb0..d99b293 100644 --- a/src/Dax.Vpax.CLI/version.json +++ b/src/Dax.Vpax.CLI/version.json @@ -1,11 +1,11 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "0.1-beta", + "version": "1.0", "nugetPackageVersion": { "semVer": 2 }, "publicReleaseRefSpec": [ - "^refs/heads/master" + "^refs/heads/master$" ], "pathFilters": [ "./"