From c7a1f15fcf8527307eb636351099d272f0257e2c Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Mon, 9 Feb 2026 11:59:22 -0500 Subject: [PATCH] refactor: move to single-repo pattern for releases --- .gitea/workflows/release.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index b153b98..7ae4163 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -115,6 +115,9 @@ jobs: continue-on-error: true run: | [ "$SKIP_BUILD" = "true" ] && exit 0 + # Push tag to GitHub first so it exists before creating the release + git remote add github-release https://x-access-token:${{ secrets.GH_PAT }}@github.com/cpfarhood/headlamp-polaris-plugin.git 2>/dev/null || true + git push -f github-release ${GITHUB_REF_NAME} 2>/dev/null || true GH_API="https://api.github.com/repos/cpfarhood/headlamp-polaris-plugin" # Create release or fetch existing one BODY=$(curl -s -X POST \ @@ -172,7 +175,7 @@ jobs: git fetch origin ${GITEA_BRANCH} git checkout origin/${GITEA_BRANCH} -B temp-update sed -i "s|headlamp/plugin/archive-checksum:.*|headlamp/plugin/archive-checksum: sha256:${CHECKSUM}|" artifacthub-pkg.yml - sed -i "s|headlamp/plugin/archive-url:.*|headlamp/plugin/archive-url: \"https://github.com/${GITHUB_REPO}/releases/download/${GITHUB_REF_NAME}/headlamp-polaris-plugin-${VERSION}.tar.gz\"|" artifacthub-pkg.yml + sed -i "s|headlamp/plugin/archive-url:.*|headlamp/plugin/archive-url: \"https://github.com/cpfarhood/headlamp-polaris-plugin/releases/download/${GITHUB_REF_NAME}/headlamp-polaris-plugin-${VERSION}.tar.gz\"|" artifacthub-pkg.yml sed -i "s|^version:.*|version: ${VERSION}|" artifacthub-pkg.yml git add artifacthub-pkg.yml git diff --cached --quiet || { @@ -185,8 +188,9 @@ jobs: git tag -f ${GITHUB_REF_NAME} git push -f origin ${GITHUB_REF_NAME} # Also push to GitHub directly to avoid waiting for mirror sync - # Dev versions go to main branch of dev repo, stable versions to main of main repo - git remote add github https://x-access-token:${{ secrets.GH_PAT }}@github.com/${GITHUB_REPO}.git 2>/dev/null || true + # Single repo pattern: both stable and dev releases go to same GitHub repo + # ArtifactHub will differentiate based on prerelease flag in metadata + git remote add github https://x-access-token:${{ secrets.GH_PAT }}@github.com/cpfarhood/headlamp-polaris-plugin.git 2>/dev/null || true git push github temp-update:main 2>/dev/null || true git push -f github ${GITHUB_REF_NAME} 2>/dev/null || true echo "Tag ${GITHUB_REF_NAME} aligned with updated metadata"