From 0087927bf76d51938a1ca0c94c0af6d070b2fe0b Mon Sep 17 00:00:00 2001 From: Steven Giesel Date: Thu, 21 Mar 2024 08:12:23 +0100 Subject: [PATCH] fix: Corrected Workflow --- .github/workflows/create-release.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ebebc41f..3d7fcfc7 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -21,9 +21,13 @@ jobs: - name: Determine Version id: version run: | - VERSION="${{ github.event.inputs.versionIncrement }}${{ if eq(github.event.inputs.prerelease, 'true') }}-preview${{ endif }}" - echo "VERSION=$VERSION" >> $GITHUB_ENV - echo "::set-output name=resolved_version::$VERSION" + if [ "${{ github.event.inputs.prerelease }}" = "true" ]; then + echo "FINAL_VERSION=${{ github.event.inputs.versionIncrement }}-preview" >> $GITHUB_ENV + echo "::set-output name=version::${{ github.event.inputs.versionIncrement }}-preview" + else + echo "FINAL_VERSION=${{ github.event.inputs.versionIncrement }}" >> $GITHUB_ENV + echo "::set-output name=version::${{ github.event.inputs.versionIncrement }}" + fi - name: Checkout repository uses: actions/checkout@v4 @@ -78,7 +82,7 @@ jobs: - name: Create release package run: | - dotnet pack -c RELEASE -p:PackageVersion=${{ steps.version.outputs.resolved_version }} --property:PackageOutputPath=${GITHUB_WORKSPACE}/packages /p:ContinuousIntegrationBuild=true --nologo --include-symbols -p:SymbolPackageFormat=snupkg + dotnet pack -c RELEASE -p:PackageVersion=${{ steps.version.outputs.version }} --property:PackageOutputPath=${GITHUB_WORKSPACE}/packages /p:ContinuousIntegrationBuild=true --nologo --include-symbols -p:SymbolPackageFormat=snupkg - name: Upload to nuget run: |