Skip to content

Commit

Permalink
Changing the way to extract the TFM in CI/CD action for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutomi committed Feb 26, 2024
1 parent d641b3d commit ed139b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ jobs:
- name: Set the TFM in Windows
if: startsWith(matrix.os, 'windows')
run: |
$VERSION = ${{ matrix.dotnet }} -replace '[^0-9.]', ''
$VERSION = $VERSION.TrimEnd('.')
$VERSION = $env:{{ matrix.dotnet }}.Substring(0, $env:{{ matrix.dotnet }}.LastIndexOf('.'))
$DOTNET_TFM = "net$VERSION"
echo "DOTNET_TFM=$DOTNET_TFM" | Out-File -FilePath $env:GITHUB_ENV -Append
Expand Down

0 comments on commit ed139b6

Please sign in to comment.