Skip to content

Commit 10cd596

Browse files
committed
chore: Update GitVersion configuration to use 'master' branch instead of 'main' branch
1 parent 282953c commit 10cd596

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/master.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
id: version # step id used as reference for output values
2424
uses: gittools/actions/gitversion/execute@v3.0.0
2525

26-
- name: Print GitVersion_SemVer
27-
run: echo "The GitVersion_SemVer is ${{ env.GitVersion_SemVer }}"
26+
- name: Print GitVersion_MajorMinorPatch
27+
run: echo "The GitVersion_MajorMinorPatch is ${{ env.GitVersion_MajorMinorPatch }}"
2828
- name: Setup .NET SDK
2929
uses: actions/setup-dotnet@v1
3030
with:
@@ -34,12 +34,12 @@ jobs:
3434
run: dotnet restore CronScheduler.sln
3535

3636
- name: Build
37-
run: dotnet build CronScheduler.sln --configuration Release --no-restore /p:Version=${{ env.GitVersion_SemVer }}
37+
run: dotnet build CronScheduler.sln --configuration Release --no-restore /p:Version=${{ env.GitVersion_MajorMinorPatch }}
3838

3939
- name: Test
4040
run: dotnet test
4141

4242
- name: Publish NuGet package
4343
run: |
44-
dotnet pack src/YourProject/YourProject.csproj --configuration Release --output ./nupkg /p:Version=${{ env.GitVersion_SemVer }} /p:Version=${{ env.GitVersion_SemVer }}
44+
dotnet pack src/YourProject/YourProject.csproj --configuration Release --output ./nupkg /p:Version=${{ env.GitVersion_MajorMinorPatch }} /p:Version=${{ env.GitVersion_MajorMinorPatch }}
4545
dotnet nuget push ./nupkg/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate

GitVersion.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mode: ContinuousDelivery
22
branches:
33
main:
4-
regex: ^main$
4+
regex: ^master$
55
label: ''
66
increment: Patch
77
is-release-branch: true
@@ -17,6 +17,11 @@ branches:
1717
regex: ^chore[/-]
1818
label: beta
1919
increment: None
20+
# Fallback configuration for any branch not matching the above patterns
21+
other:
22+
regex: .*
23+
label: ''
24+
increment: Patch
2025
pull-request:
2126
regex: ^(pull|pr)[/-]
2227
label: alpha

0 commit comments

Comments
 (0)