Prompt for Forgejo token during release publishing

This commit is contained in:
Elijah 2026-07-19 19:18:15 -07:00
parent 1bea5547a6
commit e9d76cc4a2
3 changed files with 41 additions and 1 deletions

View file

@ -12,7 +12,13 @@ param(
)
$ErrorActionPreference = 'Stop'
if (-not $Token) { throw 'FORGEJO_TOKEN or FORGEJO_PAT is required. Set it only for this PowerShell process.' }
if (-not $Token) {
Write-Host 'A Forgejo personal access token is required to create the release.' -ForegroundColor Cyan
Write-Host 'The token is used only by this process and is not saved by Decky.' -ForegroundColor DarkGray
$secureToken = Read-Host 'Forgejo personal access token' -AsSecureString
$Token = [Net.NetworkCredential]::new('', $secureToken).Password
}
if (-not $Token) { throw 'No Forgejo personal access token was entered.' }
$repositoryRoot = Split-Path -Parent $PSScriptRoot
$releaseDirectory = Join-Path $repositoryRoot "artifacts\release\v$Version"