Detect Gitea release tags by reference name
Some checks failed
OfficeCom Sentinel Client / build-client-windows (push) Failing after 18s
OfficeCom Sentinel Client / validate-client (push) Successful in 23s

This commit is contained in:
OfficeCom Codex
2026-07-25 10:22:43 +02:00
parent d37fba137e
commit f9d7647046
2 changed files with 5 additions and 5 deletions

View File

@@ -54,11 +54,11 @@ jobs:
shell: pwsh
run: |
$ref = if ($env:GITHUB_REF) { $env:GITHUB_REF } else { $env:GITEA_REF }
if ($ref -notlike "refs/tags/v*") {
$tag = if ($env:GITHUB_REF_NAME) { $env:GITHUB_REF_NAME } else { Split-Path -Leaf $ref }
if ($tag -notlike "v*") {
Write-Host "Not a version tag; skipping release manifest."
exit 0
}
$tag = Split-Path -Leaf $ref
$artifactUrl = "https://gitea.officecom.cloud/officecom/oc-sentinel/releases/download/$tag/OCSentinelClient-win-x64.zip"
./build/build-release-manifest.ps1 -ArtifactUrl $artifactUrl
@@ -76,7 +76,8 @@ jobs:
shell: pwsh
run: |
$ref = if ($env:GITHUB_REF) { $env:GITHUB_REF } else { $env:GITEA_REF }
if ($ref -notlike "refs/tags/v*") {
$tag = if ($env:GITHUB_REF_NAME) { $env:GITHUB_REF_NAME } else { Split-Path -Leaf $ref }
if ($tag -notlike "v*") {
Write-Host "Not a version tag; skipping Gitea release publication."
exit 0
}
@@ -88,7 +89,6 @@ jobs:
throw "Gitea release environment is incomplete. Expected GITEA_TOKEN, repository, and server URL."
}
$baseUrl = "$serverUrl/api/v1/repos/$repository"
$tag = Split-Path -Leaf $ref
$releaseBody = @{
tag_name = $tag
target_commitish = "${{ github.sha }}"