From a4895cc34c18f31a256d464770b339603834bafa Mon Sep 17 00:00:00 2001 From: Micheal Colhoun Date: Wed, 8 Sep 2021 12:45:35 +0100 Subject: [PATCH] GitHub Actions using Powershell Environment Variables --- .github/workflows/dotnet.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index f9caef3..41beec0 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -31,8 +31,10 @@ jobs: with: dotnet-version: 5.0.x - name: Set VERSION variable from tag - run: echo "VERSION=1.0.0" >> $GITHUB_ENV - + #run: echo "VERSION=1.0.0" >> $GITHUB_ENV + run: | + $version = "1.0.0" + echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append - name: Build run: dotnet build ${{env.SOLUTION}} --configuration ${{env.BUILD_CONFIG}} --no-restore @@ -44,4 +46,4 @@ jobs: echo Version: $ENV:VERSION echo GITHUB_REPOSITORY: $ENV:GITHUB_REPOSITORY - name: Pack - run: dotnet pack --configuration Release /p:Version=${VERSION} --output . \ No newline at end of file + run: dotnet pack --configuration Release /p:Version=$ENV:VERSION --output . \ No newline at end of file