File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 tag : ${{ needs.set-params.outputs.tag }}
5252 prerelease : ${{ fromJSON(needs.set-params.outputs.prerelease) }}
5353 chart-suffix : " "
54+
55+ upload-artifacts :
56+ needs : set-params
57+ runs-on : ubuntu-latest
58+ permissions :
59+ contents : write
60+ steps :
61+ - name : Checkout source
62+ uses : actions/checkout@v6
63+
64+ - name : Set up Go
65+ uses : actions/setup-go@v5
66+ with :
67+ go-version-file : go.mod
68+
69+ - name : Setup Kubectl
70+ uses : azure/setup-kubectl@v4
71+ with :
72+ version : ' latest'
73+
74+ - name : Build Artifacts
75+ run : |
76+ make artifacts
77+
78+ - name : Upload Release Assets
79+ env :
80+ GITHUB_TOKEN : ${{ github.token }}
81+ run : |
82+ files=$(find artifacts -type f -size +0c | tr '\n' ' ')
83+ if [ -z "$files" ]; then
84+ echo "No artifacts to upload."
85+ exit 0
86+ fi
87+ if gh release view "${{ needs.set-params.outputs.tag }}" >/dev/null 2>&1; then
88+ gh release upload "${{ needs.set-params.outputs.tag }}" $files --clobber
89+ else
90+ echo "Release ${{ needs.set-params.outputs.tag }} does not exist. Creating a draft release..."
91+ gh release create "${{ needs.set-params.outputs.tag }}" $files --draft --title "${{ needs.set-params.outputs.tag }}" --notes "Release ${{ needs.set-params.outputs.tag }}"
92+ fi
93+
Original file line number Diff line number Diff line change @@ -360,6 +360,19 @@ helm-push-standalone: ## Package and push the llm-d-router-standalone Helm chart
360360 $(MAKE ) helm-push CHART=llm-d-router-standalone
361361
362362
363+ # #@ Release
364+
365+ .PHONY : artifacts
366+ artifacts : yq check-kustomize # # Generate release artifacts (CRD manifests)
367+ if [ -d artifacts ]; then rm -rf artifacts; fi
368+ mkdir -p artifacts
369+ kubectl kustomize config/crd > artifacts/manifests_all.yaml
370+ $(YQ ) -P ' select(.spec.group == "llm-d.ai")' artifacts/manifests_all.yaml > artifacts/manifests.yaml
371+ rm -f artifacts/manifests_all.yaml
372+ $(YQ ) -P ' select(.spec.versions | map(.name == "v1") | any)' artifacts/manifests.yaml > artifacts/v1-manifests.yaml
373+ $(YQ ) -P ' select(.spec.versions | map(.name != "v1") | all)' artifacts/manifests.yaml > artifacts/experimental-manifests.yaml
374+
375+
363376# #@ Coverage
364377
365378COVERAGE_DIR ?= coverage
You can’t perform that action at this time.
0 commit comments