Skip to content

Commit

Permalink
GitHub Actions using Powershell Environment Variables
Browse files Browse the repository at this point in the history
  • Loading branch information
colhountech committed Sep 8, 2021
1 parent 7f2703f commit a4895cc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 .
run: dotnet pack --configuration Release /p:Version=$ENV:VERSION --output .

0 comments on commit a4895cc

Please sign in to comment.