Prompt for Forgejo token during release publishing
This commit is contained in:
parent
1bea5547a6
commit
e9d76cc4a2
3 changed files with 41 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue