From 54ee71727e6120fdcde52cde1dda2ee45ab89182 Mon Sep 17 00:00:00 2001 From: kerthcet Date: Mon, 2 Nov 2026 23:34:42 +0000 Subject: [PATCH 1/2] fix release error Signed-off-by: kerthcet --- .github/workflows/release.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37c614c..e7811da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,10 @@ name: Release # Tag-driven: the tag IS the version. Nothing in the repo pins a release version, so a release # needs no prior bump commit -- the tag is stamped into the images, the binary (VERSION -> -# pkg/version) and dist/install.yaml below. workflow_dispatch exists to re-publish a tag whose -# first run failed halfway, without moving the tag. +# pkg/version) and dist/install.yaml below. Publishing a release from the GitHub UI creates its +# tag, which lands here through the same push trigger -- a `release: published` trigger would +# only start a second, racing run. workflow_dispatch exists to re-publish a tag whose first run +# failed halfway, without moving the tag. on: push: tags: @@ -78,12 +80,18 @@ jobs: - name: Generate install manifest run: make build-installer IMG=${{ env.CONTROLLER_IMAGE }}:${{ env.VERSION }} - # Runs after the images so a published release never points at a tag nobody can pull. + # Runs after the images so a release this creates never points at a tag nobody can pull. + # One published from the UI, or being re-published, already exists: it only gets the + # manifest, and its title, notes and pre-release flag stay as its author set them. # A pre-release suffix (v0.2.0-rc.1) must not become the repo's "latest" release. - - name: Create release + - name: Publish release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + if gh release view "$VERSION" >/dev/null 2>&1; then + gh release upload "$VERSION" dist/install.yaml --clobber + exit 0 + fi prerelease="" case "$VERSION" in *-*) prerelease="--prerelease" ;; esac gh release create "$VERSION" dist/install.yaml \ From fd94379560b49eb890281f58359e6b23ff9d9874 Mon Sep 17 00:00:00 2001 From: kerthcet Date: Mon, 2 Nov 2026 23:39:01 +0000 Subject: [PATCH 2/2] remove workflow_dispatch Signed-off-by: kerthcet --- .github/workflows/release.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e7811da..551a2f3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,24 +4,19 @@ name: Release # needs no prior bump commit -- the tag is stamped into the images, the binary (VERSION -> # pkg/version) and dist/install.yaml below. Publishing a release from the GitHub UI creates its # tag, which lands here through the same push trigger -- a `release: published` trigger would -# only start a second, racing run. workflow_dispatch exists to re-publish a tag whose first run -# failed halfway, without moving the tag. +# only start a second, racing run. To retry a failed release, re-run its run: that keeps the +# tag's commit, where a dispatch would check out the branch it was started from. on: push: tags: - 'v*' - workflow_dispatch: - inputs: - version: - description: Existing tag to publish - required: true permissions: contents: read env: CONTROLLER_IMAGE: inftyai/nebula-controller - VERSION: ${{ inputs.version || github.ref_name }} + VERSION: ${{ github.ref_name }} jobs: # Both images ship under the same tag. Their names are repeated here rather than taken from env @@ -81,7 +76,7 @@ jobs: run: make build-installer IMG=${{ env.CONTROLLER_IMAGE }}:${{ env.VERSION }} # Runs after the images so a release this creates never points at a tag nobody can pull. - # One published from the UI, or being re-published, already exists: it only gets the + # One published from the UI, or left by a re-run, already exists: it only gets the # manifest, and its title, notes and pre-release flag stay as its author set them. # A pre-release suffix (v0.2.0-rc.1) must not become the repo's "latest" release. - name: Publish release