From a4f5aa8599d763234b0e279026849daea40ded48 Mon Sep 17 00:00:00 2001 From: Lucas Teles Date: Mon, 24 Feb 2025 12:06:40 -0300 Subject: [PATCH] patch: update versioning --- .config/dotnet-tools.json | 57 ++++++++++------------ .github/workflows/publish.yml | 18 ++++--- GitVersion.yml | 11 +++-- tests/Backdash.Tests/Backdash.Tests.csproj | 2 +- 4 files changed, 43 insertions(+), 45 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 16086882..0093ffcb 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -1,34 +1,27 @@ { - "version": 1, - "isRoot": true, - "tools": { - "dotnet-reportgenerator-globaltool": { - "version": "5.4.4", - "commands": [ - "reportgenerator" - ], - "rollForward": false - }, - "nuke.globaltool": { - "version": "9.0.4", - "commands": [ - "nuke" - ], - "rollForward": false - }, - "docfx": { - "version": "2.78.3", - "commands": [ - "docfx" - ], - "rollForward": false - }, - "gitversion.tool": { - "version": "6.1.0", - "commands": [ - "dotnet-gitversion" - ], - "rollForward": false + "version": 1, + "isRoot": true, + "tools": { + "dotnet-reportgenerator-globaltool": { + "version": "5.4.4", + "commands": [ + "reportgenerator" + ], + "rollForward": false + }, + "nuke.globaltool": { + "version": "9.0.4", + "commands": [ + "nuke" + ], + "rollForward": false + }, + "docfx": { + "version": "2.78.3", + "commands": [ + "docfx" + ], + "rollForward": false + } } - } -} \ No newline at end of file +} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5a5ab96d..4e00a1fb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,6 +18,7 @@ env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true DOTNET_CLI_TELEMETRY_OPTOUT: true GITHUB_ACTIONS: true + NUGET_TAG: -preview jobs: build: @@ -39,13 +40,15 @@ jobs: global-json-file: global.json - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v1.1.1 + uses: gittools/actions/gitversion/setup@v3.1.11 with: - versionSpec: 5.x + versionSpec: 6.0.x - name: Determine Version - uses: gittools/actions/gitversion/execute@v1.1.1 + uses: gittools/actions/gitversion/execute@v3.1.11 id: gitversion + with: + useConfigFile: true - name: Tool Restore run: dotnet tool restore @@ -54,9 +57,10 @@ jobs: run: dotnet nuke test - name: Build and Pack NuGet package run: | - dotnet pack src/Backdash --configuration Release --include-symbols -p:Version='${{ steps.gitversion.outputs.SemVer }}' --output ./build_artifacts - dotnet pack src/Backdash.Utils --configuration Release --include-symbols -p:Version='${{ steps.gitversion.outputs.SemVer }}' --output ./build_artifacts - dotnet pack src/Backdash.Analyzers --configuration Release --include-symbols -p:Version='${{ steps.gitversion.outputs.SemVer }}' --output ./build_artifacts + SEMVER="${{ steps.gitversion.outputs.SemVer }}${{ env.NUGET_TAG }}" + dotnet pack src/Backdash --configuration Release --include-symbols -p:Version="$SEMVER" --output ./build_artifacts + dotnet pack src/Backdash.Utils --configuration Release --include-symbols -p:Version="$SEMVER" --output ./build_artifacts + dotnet pack src/Backdash.Analyzers --configuration Release --include-symbols -p:Version="$SEMVER" --output ./build_artifacts - name: Upload lib NuGet package artifact to GitHub uses: actions/upload-artifact@v4 @@ -102,7 +106,7 @@ jobs: uses: ncipollo/release-action@v1 with: tag: ${{ needs.build.outputs.Version }} - prerelease: ${{ needs.build.outputs.PreReleaseTag }} + prerelease: true name: Release ${{ needs.build.outputs.Version }} artifacts: "build_artifacts/*" token: ${{ secrets.GITHUB_TOKEN }} diff --git a/GitVersion.yml b/GitVersion.yml index cca132da..f5781f73 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,13 +1,14 @@ -next-version: 0.5.2 -mode: ContinuousDelivery -continuous-delivery-fallback-tag: "" +workflow: GitFlow/v1 +mode: ContinuousDeployment +next-version: 0.5.3 + major-version-bump-message: "^(breaking|major):" minor-version-bump-message: "^(feature|minor):" patch-version-bump-message: "^(fix|patch):" no-bump-message: "^(none|skip):" + branches: main: regex: ^master$|^main$ - tag: beta - is-mainline: true + is-main-branch: true source-branches: [ ] diff --git a/tests/Backdash.Tests/Backdash.Tests.csproj b/tests/Backdash.Tests/Backdash.Tests.csproj index b4da7b91..beea4555 100644 --- a/tests/Backdash.Tests/Backdash.Tests.csproj +++ b/tests/Backdash.Tests/Backdash.Tests.csproj @@ -9,7 +9,7 @@ CS1591;NU1903 - +