Sfoglia il codice sorgente

Trying to get gitversion to do what I want

Tigger Kindel 2 anni fa
parent
commit
570de8f110
3 ha cambiato i file con 10 aggiunte e 3 eliminazioni
  1. 5 0
      .github/GitVersion.yml
  2. 2 0
      .github/workflows/publish.yml
  3. 3 3
      Release.ps1

+ 5 - 0
.github/GitVersion.yml

@@ -0,0 +1,5 @@
+branches: 
+  master:
+    tag: ''
+  v2_develop:
+    tag: 'alpha'

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

@@ -22,6 +22,8 @@ jobs:
 
     - name: Determine Version
       uses: gittools/actions/gitversion/execute@v0
+      with:
+        useConfigFile: true      
       id: gitversion # step id used as reference for output values
 
     - name: Display GitVersion outputs

+ 3 - 3
Release.ps1

@@ -14,12 +14,12 @@ try {
     Write-Host "Pulling latest from upstream branch $branch"
     git pull upstream $branch
 
-    Write-Host "Tagging release with tag $tag"
-    git tag $tag -a -m $releaseMessage
-
     Write-Host "Creating empty commit with message $releaseMessage"
     git commit --allow-empty -m $releaseMessage
 
+    Write-Host "Tagging release with tag $tag"
+    git tag $tag -a -m $releaseMessage
+
     Write-Host "Pushing changes to upstream"
     git push --atomic upstream $branch $tag
 } catch {