refactor: move to single-repo pattern for releases
Switch from dual-repo (stable + dev) to single-repo pattern where both stable and dev releases are published to the same GitHub repository. Changes: - Remove GITHUB_REPO routing logic (was causing releases to wrong repo) - Hardcode all GitHub URLs to cpfarhood/headlamp-polaris-plugin - Update dev branch metadata to point to main repo - Keep prerelease flag in metadata for ArtifactHub differentiation - Workflow pushes both stable and dev releases to same repo - ArtifactHub will show dev releases under "Include prereleases" toggle This follows the standard mono-repo release pattern (like Node.js, K8s) where users see one package with stable/prerelease versions.
This commit is contained in:
@@ -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"
|
||||
|
||||
+2
-4
@@ -12,7 +12,7 @@ description: >-
|
||||
Requires a Role granting `get` on `services/proxy` for the
|
||||
`polaris-dashboard` service in the `polaris` namespace.
|
||||
license: MIT
|
||||
homeURL: "https://github.com/cpfarhood/headlamp-polaris-plugin-dev"
|
||||
homeURL: "https://github.com/cpfarhood/headlamp-polaris-plugin"
|
||||
category: security
|
||||
keywords:
|
||||
- polaris
|
||||
@@ -23,8 +23,6 @@ keywords:
|
||||
- kubernetes
|
||||
links:
|
||||
- name: Source
|
||||
url: "https://github.com/cpfarhood/headlamp-polaris-plugin-dev"
|
||||
- name: Main Repository
|
||||
url: "https://github.com/cpfarhood/headlamp-polaris-plugin"
|
||||
- name: Polaris
|
||||
url: "https://polaris.docs.fairwinds.com/"
|
||||
@@ -32,7 +30,7 @@ maintainers:
|
||||
- name: cpfarhood
|
||||
email: "chris@farhood.org"
|
||||
annotations:
|
||||
headlamp/plugin/archive-url: "https://github.com/cpfarhood/headlamp-polaris-plugin-dev/releases/download/v0.2.0-dev.3/headlamp-polaris-plugin-0.2.0-dev.3.tar.gz"
|
||||
headlamp/plugin/archive-url: "https://github.com/cpfarhood/headlamp-polaris-plugin/releases/download/v0.2.0-dev.3/headlamp-polaris-plugin-0.2.0-dev.3.tar.gz"
|
||||
headlamp/plugin/version-compat: ">=0.26"
|
||||
headlamp/plugin/archive-checksum: sha256:0000000000000000000000000000000000000000000000000000000000000000
|
||||
headlamp/plugin/distro-compat: in-cluster
|
||||
|
||||
Reference in New Issue
Block a user