Skip to content

Commit e5ed27b

Browse files
authored
Merge pull request #24 from unoplatform/dev/agzi/uno.devtools.telemetry-tag-release
2 parents d59b99e + 47f34f7 commit e5ed27b

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,38 @@ jobs:
161161
shell: pwsh
162162
run: |
163163
dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k "${{ secrets.NUGET_ORG_API_KEY }}"
164+
165+
tag_release:
166+
name: Tag Release
167+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/') }}
168+
runs-on: windows-latest
169+
permissions:
170+
contents: write
171+
172+
needs:
173+
- publish_prod
174+
175+
steps:
176+
- name: Checkout
177+
uses: actions/checkout@v4
178+
with:
179+
fetch-depth: 0
180+
181+
- uses: dotnet/nbgv@f088059084cb5d872e9d1a994433ca6440c2bf72 # v0.4.2
182+
id: nbgv
183+
with:
184+
toolVersion: 3.6.139
185+
setAllVars: true
186+
187+
- name: Tag and push to GitHub
188+
shell: pwsh
189+
run: |
190+
git config user.email "info@platform.uno"
191+
git config user.name "Uno DevOps"
192+
git rev-parse --verify "refs/tags/$env:NBGV_SemVer2" 2>$null
193+
if ($LASTEXITCODE -eq 0) {
194+
Write-Host "Tag $env:NBGV_SemVer2 already exists, skipping."
195+
} else {
196+
git tag $env:NBGV_SemVer2
197+
git push origin $env:NBGV_SemVer2
198+
}

0 commit comments

Comments
 (0)