Browse Source

Tweaked yml for gitversion

Tigger Kindel 2 years ago
parent
commit
037e4bcf0d
2 changed files with 23 additions and 5 deletions
  1. 17 3
      .github/workflows/dotnet-core.yml
  2. 6 2
      .github/workflows/publish.yml

+ 17 - 3
.github/workflows/dotnet-core.yml

@@ -12,24 +12,38 @@ on:
       
 jobs:
   build:
-
     runs-on: ubuntu-latest
 
     steps:
     - uses: actions/checkout@v3
 
+    - name: Install and calculate the new version with GitVersion 
+      uses: gittools/actions/gitversion/setup@v0
+      with:
+          versionSpec: '6.x'
+          includePrerelease: true
+
+    - name: Determine Version
+      uses: gittools/actions/gitversion/execute@v0
+      with:
+        useConfigFile: true
+      id: gitversion # step id used as reference for output values
+
     - name: Setup .NET Core
       uses: actions/setup-dotnet@v3
       with:
         dotnet-version: 7.0
+        dotnet-quality: 'ga'
 
     - name: Install dependencies
       run: |
         dotnet restore
 
     - name: Build Debug
-      run: dotnet build --configuration Debug --no-restore
-
+      run: |
+        dotnet-gitversion /updateprojectfiles
+        dotnet build --configuration Debug --no-restore
+        
     - name: Test
       run: |
         sed -i 's/"stopOnFail": false/"stopOnFail": true/g' UnitTests/xunit.runner.json

+ 6 - 2
.github/workflows/publish.yml

@@ -21,17 +21,21 @@ jobs:
     - name: Install and calculate the new version with GitVersion 
       uses: gittools/actions/gitversion/setup@v0
       with:
-        versionSpec: 5.x
+          versionSpec: '6.x'
+          includePrerelease: true
 
     - name: Determine Version
       uses: gittools/actions/gitversion/execute@v0
+      with:
+        useConfigFile: true      
       id: gitversion # step id used as reference for output values
 
     - name: Setup dotnet
       uses: actions/setup-dotnet@v3
       with:
         dotnet-version: 7.0
-
+        dotnet-quality: 'ga'
+        
     - name: Install dependencies
       run: dotnet restore