diff --git a/.github/workflows/JsBind.Net-Build.yml b/.github/workflows/JsBind.Net-Build.yml index e478ebf..5a448aa 100644 --- a/.github/workflows/JsBind.Net-Build.yml +++ b/.github/workflows/JsBind.Net-Build.yml @@ -8,8 +8,7 @@ jobs: version: runs-on: ubuntu-latest outputs: - SemVer: ${{ steps.gitversion.outputs.SemVer }} - FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }} + NuGetVersion: ${{ steps.gitversion.outputs.NuGetVersion }} steps: - name: Checkout uses: actions/checkout@v2 @@ -76,7 +75,7 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} shell: powershell run: | - .\.sonar\scanner\dotnet-sonarscanner begin /k:"JsBind.Net" /o:"mingyaulee" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /v:"v${{ needs.version.outputs.FullSemVer }}" /d:sonar.cs.vstest.reportsPaths="test/TestResults/*.trx" /d:sonar.cs.opencover.reportsPaths="test/TestResults/**/*.opencover.xml" + .\.sonar\scanner\dotnet-sonarscanner begin /k:"JsBind.Net" /o:"mingyaulee" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /v:"v${{ needs.version.outputs.NuGetVersion }}" /d:sonar.cs.vstest.reportsPaths="test/TestResults/*.trx" /d:sonar.cs.opencover.reportsPaths="test/TestResults/**/*.opencover.xml" dotnet build --no-restore --configuration Release .\.coverlet\console\coverlet ./test/JsBind.Net.Tests/bin/Release/net7.0/wwwroot/_framework --include "[JsBind.Net*]*" --target "dotnet" --targetargs "test . --no-restore --no-build --configuration Release" --format opencover --output ./test/TestResults/coverage --verbosity detailed .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" @@ -91,7 +90,7 @@ jobs: uses: mukunku/tag-exists-action@v1.0.0 id: tagExistsCheck with: - tag: 'v${{ needs.version.outputs.SemVer }}' + tag: 'v${{ needs.version.outputs.NuGetVersion }}' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create tag @@ -99,4 +98,4 @@ jobs: uses: negz/create-tag@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - version: v${{ needs.version.outputs.SemVer }} + version: v${{ needs.version.outputs.NuGetVersion }} diff --git a/.github/workflows/JsBind.Net-Release.yml b/.github/workflows/JsBind.Net-Release.yml index 7fb3248..b23d8c5 100644 --- a/.github/workflows/JsBind.Net-Release.yml +++ b/.github/workflows/JsBind.Net-Release.yml @@ -29,9 +29,9 @@ jobs: - name: Restore dependencies run: dotnet restore - name: Build - run: 'dotnet build --no-restore --configuration Release -p:"AssemblyVersion=${{ steps.gitversion.outputs.MajorMinorPatch }};Version=${{ steps.gitversion.outputs.SemVer }}"' + run: dotnet build --no-restore --configuration Release -p:Version=${{ steps.gitversion.outputs.NuGetVersion }} - name: Pack - run: 'dotnet pack --no-restore --no-build --configuration Release -p:PackageVersion=${{ steps.gitversion.outputs.SemVer }}' + run: dotnet pack --no-restore --no-build --configuration Release -p:Version=${{ steps.gitversion.outputs.NuGetVersion }} - name: Push generated package to NuGet run: dotnet nuget push ./src/PackageOutput/*.nupkg --api-key ${NUGET_AUTH_TOKEN} --source https://api.nuget.org/v3/index.json env: