From 6e23c2c821b5e4326d1a1bb5708a99593a8fa7a7 Mon Sep 17 00:00:00 2001 From: Emanuel Palm Date: Fri, 18 Oct 2024 23:18:00 +0200 Subject: [PATCH] gitversion changes --- .github/actions/build/action.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index bcf48b7..ccdbe32 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -27,11 +27,21 @@ runs: shell: pwsh run: ./build.ps1 -ResolveDependency -Task noop + # Replace dot in semVer with dash, for Sampler validation in pre-release + - name: Format semVer for Sampler + id: formatSemVer + shell: pwsh + run: | + $SemVer = '${{ steps.gitversion.outputs.semVer }}' + # Replace last dot with dash for Sampler to accept it as pre-release, does not allow dots in pre-release name + $SemVer = $SemVer -replace '^([\d\.]+\-\w+)\.(\d+)$','$1-$2' + Add-Content -Path $env:GITHUB_OUTPUT -Value "formattedSemVer=$SemVer" + - name: Build module shell: pwsh run: ./build.ps1 -tasks pack env: - ModuleVersion: ${{ env.gitVersion.NuGetVersionV2 }} + ModuleVersion: ${{ steps.formatSemVer.outputs.formattedSemVer }} - name: Publish build artifacts uses: actions/upload-artifact@v4