Skip to content

Commit aec93e2

Browse files
committed
Update gittools gitversion
1 parent b84c348 commit aec93e2

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

.github/workflows/WebExtensions.Net-Build.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,19 @@ jobs:
1212
version:
1313
runs-on: ubuntu-latest
1414
outputs:
15-
NuGetVersion: ${{ steps.gitversion.outputs.NuGetVersion }}
15+
MajorMinorPatch: ${{ steps.gitversion.outputs.MajorMinorPatch }}
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
2121
- name: Install GitVersion
22-
uses: gittools/actions/gitversion/setup@v3.2.1
22+
uses: gittools/actions/gitversion/setup@v4.0.1
2323
with:
24-
versionSpec: 5.x
24+
versionSpec: 6.x
2525
- name: Determine Version
2626
id: gitversion
27-
uses: gittools/actions/gitversion/[email protected]
28-
with:
29-
useConfigFile: true
27+
uses: gittools/actions/gitversion/[email protected]
3028

3129
buildAndTest:
3230
needs: version
@@ -77,7 +75,7 @@ jobs:
7775
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
7876
shell: powershell
7977
run: |
80-
.\.sonar\scanner\dotnet-sonarscanner begin /k:"WebExtensions.Net" /o:"mingyaulee" /d:sonar.token="${{ 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"
78+
.\.sonar\scanner\dotnet-sonarscanner begin /k:"WebExtensions.Net" /o:"mingyaulee" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /v:"v${{ needs.version.outputs.MajorMinorPatch }}" /d:sonar.cs.vstest.reportsPaths="test/TestResults/*.trx" /d:sonar.cs.opencover.reportsPaths="test/TestResults/**/*.opencover.xml"
8179
dotnet build --no-restore --configuration Release
8280
.\test\WebExtensions.Net.IntegrationTestsRunner\BuildOutput\Release\playwright.ps1 install --with-deps
8381
.\.coverlet\console\coverlet ./test/WebExtensions.Net.BrowserExtensionIntegrationTest/bin/Release/net9.0/browserextension/framework --include "[WebExtensions.Net]*" --target "dotnet" --targetargs "test . --no-restore --no-build --configuration Release" --format opencover --output ./test/TestResults/coverage --verbosity detailed
@@ -93,12 +91,12 @@ jobs:
9391
uses: mukunku/[email protected]
9492
id: tagExistsCheck
9593
with:
96-
tag: 'v${{ needs.version.outputs.NuGetVersion }}'
94+
tag: 'v${{ needs.version.outputs.MajorMinorPatch }}'
9795
env:
9896
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9997
- name: Create tag
10098
if: steps.tagExistsCheck.outputs.exists == 'false'
10199
uses: negz/create-tag@v1
102100
with:
103101
token: ${{ secrets.GITHUB_TOKEN }}
104-
version: v${{ needs.version.outputs.NuGetVersion }}
102+
version: v${{ needs.version.outputs.MajorMinorPatch }}

.github/workflows/WebExtensions.Net-Release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,18 @@ jobs:
1717
with:
1818
dotnet-version: 9.0.x
1919
- name: Install GitVersion
20-
uses: gittools/actions/gitversion/setup@v3.2.1
20+
uses: gittools/actions/gitversion/setup@v4.0.1
2121
with:
22-
versionSpec: 5.x
22+
versionSpec: 6.x
2323
- name: Determine Version
2424
id: gitversion
25-
uses: gittools/actions/gitversion/[email protected]
26-
with:
27-
useConfigFile: true
25+
uses: gittools/actions/gitversion/[email protected]
2826
- name: Restore dependencies
2927
run: dotnet restore
3028
- name: Build
31-
run: dotnet build --no-restore --configuration Release -p:Version=${{ steps.gitversion.outputs.NuGetVersion }}
29+
run: dotnet build --no-restore --configuration Release -p:Version=${{ steps.gitversion.outputs.MajorMinorPatch }}
3230
- name: Pack
33-
run: dotnet pack --no-restore --no-build --configuration Release -p:Version=${{ steps.gitversion.outputs.NuGetVersion }}
31+
run: dotnet pack --no-restore --no-build --configuration Release -p:Version=${{ steps.gitversion.outputs.MajorMinorPatch }}
3432
- name: Push generated package to NuGet
3533
run: dotnet nuget push ./src/PackageOutput/*.nupkg --api-key ${NUGET_AUTH_TOKEN} --source https://api.nuget.org/v3/index.json
3634
env:

0 commit comments

Comments
 (0)