Skip to content

Commit

Permalink
Always tag only on pushes to main
Browse files Browse the repository at this point in the history
  • Loading branch information
elzik committed Oct 21, 2023
1 parent 4bfc93b commit 6f61bfd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ jobs:
if: (github.ref_name == 'main' || github.event_name == 'pull_request') && matrix.os == 'windows-latest'
run: ./Build/build-windows-installer.ps1
shell: pwsh

- name: Tag With SemVer
if: github.ref_name == 'main'
run: ./Build/tag-with-semver.ps1
shell: pwsh
5 changes: 3 additions & 2 deletions Build/set-semver-tag.ps1 → Build/tag-with-semver.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dotnet tool update --global GitVersion.Tool
$semVer = (dotnet-gitversion | ConvertFrom-Json).SemVer
$tag = "v$semVer"
Write-Output "tag=$tag" >> $GITHUB_OUTPUT
Write-Output $tag
git tag $tag -f
git push --tags
Write-Output "Tagged with $tag"

0 comments on commit 6f61bfd

Please sign in to comment.