Skip to content

Commit

Permalink
build: better env handling
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Berezovskyi <[email protected]>
  • Loading branch information
berezovskyi committed Oct 19, 2024
1 parent 4653556 commit 11b7d06
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,14 @@ jobs:
shell: pwsh
run: |
Write-Host $env:GITHUB_REF
$env:GITHUB_REF -match '^refs/tags/v(.*)$' | Set-Variable VERSION $matches[1]
Write-Host $VERSION
dotnet pack -c Release -p:RELEASE_VERSION=$VERSION -o ${{ env.NuGetDirectory }}
if ( $env:GITHUB_REF -match '^refs/tags/v(.*)$' ) {
$VERSION=$matches[1]
Write-Host $VERSION
dotnet pack -c Release -p:RELEASE_VERSION=$VERSION -o ${{ env.NuGetDirectory }}
} else {
Write-Error "Failed to extract the version from env:GITHUB_REF"
Exit 1
}
if: |
success()
&& matrix.version.target == 'net8.0' && matrix.os == 'windows-latest'
Expand Down

0 comments on commit 11b7d06

Please sign in to comment.