chore: add release workflow

This commit is contained in:
2025-09-18 00:25:55 +02:00
parent 6a7bc2b544
commit 0025d3fbd8
5 changed files with 298 additions and 20 deletions

View File

@@ -0,0 +1,30 @@
# PowerShell script to create a release tag using nbgv
param(
[switch]$WhatIf
)
# Get the current version from nbgv
$version = nbgv get-version --format json | ConvertFrom-Json
$versionString = $version.SemVer2
Write-Host "Current version: $versionString" -ForegroundColor Green
if ($WhatIf) {
Write-Host "Would create tag: v$versionString" -ForegroundColor Yellow
exit 0
}
# Confirm with user
$confirm = Read-Host "Create and push tag v$versionString? (y/N)"
if ($confirm -ne 'y' -and $confirm -ne 'Y') {
Write-Host "Cancelled" -ForegroundColor Red
exit 1
}
# Create and push the tag
Write-Host "Creating tag v$versionString..." -ForegroundColor Blue
git tag "v$versionString"
git push origin "v$versionString"
Write-Host "Tag v$versionString created and pushed!" -ForegroundColor Green
Write-Host "You can now create a GitHub release at: https://github.com/mtfarkas/GithubRepoRemover/releases/new?tag=v$versionString" -ForegroundColor Cyan