ci: fix release API auth — use secrets-context job token
linux / build (push) Successful in 13m6s

This commit is contained in:
2026-11-29 15:33:35 +00:00
parent dae6bf1916
commit febea8f21d
+6 -3
View File
@@ -24,6 +24,9 @@ concurrency:
env:
GITEA_API: https://git.thetomie.com/api/v1
REPO_FULL: rockstargames/re3
# The runner injects the job token via the SECRETS context (secrets.GITEA_TOKEN /
# secrets.GITHUB_TOKEN), not as plain env vars — materialise it here once.
API_TOKEN: ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN }}
jobs:
release:
@@ -103,7 +106,7 @@ jobs:
- name: Ensure tag exists
run: |
set -euo pipefail
AUTH="Authorization: token ${GITEA_TOKEN:-${GITHUB_TOKEN:-}}"
AUTH="Authorization: token ${API_TOKEN}"
if git rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then
echo "tag $TAG is already present locally"
else
@@ -207,7 +210,7 @@ jobs:
- name: Release notes + publish
run: |
set -euo pipefail
AUTH="Authorization: token ${GITEA_TOKEN:-${GITHUB_TOKEN:-}}"
AUTH="Authorization: token ${API_TOKEN}"
PREV=$(git tag -l 'reVC-v*' --sort=-v:refname | grep -vx "$TAG" | head -n1 || true)
if [ -z "$PREV" ]; then
PREV="reVC_1.0"
@@ -268,7 +271,7 @@ jobs:
- name: Attach zip
run: |
set -euo pipefail
AUTH="Authorization: token ${GITEA_TOKEN:-${GITHUB_TOKEN:-}}"
AUTH="Authorization: token ${API_TOKEN}"
ASSET="reVC-v$VER-linux-x64-gl3-oal.zip"
URL="$GITEA_API/repos/$REPO_FULL/releases/$RID/assets?name=$ASSET"
CODE=$(curl -sS -o /tmp/asset.json -w '%{http_code}' -X POST "$URL" \