Skip to content

Commit

Permalink
chore: Update GitVersion configuration to use 'master' branch instead…
Browse files Browse the repository at this point in the history
… of 'main' branch
  • Loading branch information
kdcllc committed Jul 27, 2024
1 parent 282953c commit 10cd596
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
id: version # step id used as reference for output values
uses: gittools/actions/gitversion/execute@v3.0.0

- name: Print GitVersion_SemVer
run: echo "The GitVersion_SemVer is ${{ env.GitVersion_SemVer }}"
- name: Print GitVersion_MajorMinorPatch
run: echo "The GitVersion_MajorMinorPatch is ${{ env.GitVersion_MajorMinorPatch }}"
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
Expand All @@ -34,12 +34,12 @@ jobs:
run: dotnet restore CronScheduler.sln

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

- name: Test
run: dotnet test

- name: Publish NuGet package
run: |
dotnet pack src/YourProject/YourProject.csproj --configuration Release --output ./nupkg /p:Version=${{ env.GitVersion_SemVer }} /p:Version=${{ env.GitVersion_SemVer }}
dotnet pack src/YourProject/YourProject.csproj --configuration Release --output ./nupkg /p:Version=${{ env.GitVersion_MajorMinorPatch }} /p:Version=${{ env.GitVersion_MajorMinorPatch }}
dotnet nuget push ./nupkg/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
7 changes: 6 additions & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mode: ContinuousDelivery
branches:
main:
regex: ^main$
regex: ^master$
label: ''
increment: Patch
is-release-branch: true
Expand All @@ -17,6 +17,11 @@ branches:
regex: ^chore[/-]
label: beta
increment: None
# Fallback configuration for any branch not matching the above patterns
other:
regex: .*
label: ''
increment: Patch
pull-request:
regex: ^(pull|pr)[/-]
label: alpha
Expand Down

0 comments on commit 10cd596

Please sign in to comment.