From e84489fc8f00b9778a4a5bf22790d75b97c66b72 Mon Sep 17 00:00:00 2001 From: Christopher Winland Date: Fri, 20 Oct 2023 15:03:50 -0400 Subject: [PATCH] Update BuildAndRelease.yml --- .github/workflows/BuildAndRelease.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/BuildAndRelease.yml b/.github/workflows/BuildAndRelease.yml index 0d54784..228b0e9 100644 --- a/.github/workflows/BuildAndRelease.yml +++ b/.github/workflows/BuildAndRelease.yml @@ -29,17 +29,17 @@ jobs: - name: Fetch all tags run: git fetch --tags - - name: Validate and set version - id: validate - run: | - TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) - VERSION=${TAG#v} # Remove 'v' from the beginning of the tag - if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ ]]; then - echo ::set-output name=VERSION::$VERSION - else - echo "Error: Latest tag ($TAG) is not a valid SemVer version" - exit 1 - fi + - name: Validate and set version + id: validate + run: | + TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) + VERSION=${TAG#v} # Remove 'v' from the beginning of the tag + if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ ]]; then + echo ::set-output name=VERSION::$VERSION + else + echo "Error: Latest tag ($TAG) is not a valid SemVer version" + exit 1 + fi - name: Creating a package run: dotnet pack Wpf.NotificationCenter/Wpf.NotificationCenter.csproj --no-build -c Release -o . /p:PackageVersion=${{ steps.gettag.outputs.TAG }}