Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/ci-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,43 @@ jobs:
tag: ${{ needs.set-params.outputs.tag }}
prerelease: ${{ fromJSON(needs.set-params.outputs.prerelease) }}
chart-suffix: ""

upload-artifacts:
needs: set-params
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Setup Kubectl
uses: azure/setup-kubectl@v4
with:
version: 'latest'

- name: Build Artifacts
run: |
make artifacts

- name: Upload Release Assets
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
files=$(find artifacts -type f -size +0c | tr '\n' ' ')
if [ -z "$files" ]; then
echo "No artifacts to upload."
exit 0
fi
if gh release view "${{ needs.set-params.outputs.tag }}" >/dev/null 2>&1; then
gh release upload "${{ needs.set-params.outputs.tag }}" $files --clobber
else
echo "Release ${{ needs.set-params.outputs.tag }} does not exist. Creating a draft release..."
gh release create "${{ needs.set-params.outputs.tag }}" $files --draft --title "${{ needs.set-params.outputs.tag }}" --notes "Release ${{ needs.set-params.outputs.tag }}"
fi

13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,19 @@ helm-push-standalone: ## Package and push the llm-d-router-standalone Helm chart
$(MAKE) helm-push CHART=llm-d-router-standalone


##@ Release

.PHONY: artifacts
artifacts: yq check-kustomize ## Generate release artifacts (CRD manifests)
if [ -d artifacts ]; then rm -rf artifacts; fi
mkdir -p artifacts
kubectl kustomize config/crd > artifacts/manifests_all.yaml
$(YQ) -P 'select(.spec.group == "llm-d.ai")' artifacts/manifests_all.yaml > artifacts/manifests.yaml
rm -f artifacts/manifests_all.yaml
$(YQ) -P 'select(.spec.versions | map(.name == "v1") | any)' artifacts/manifests.yaml > artifacts/v1-manifests.yaml
$(YQ) -P 'select(.spec.versions | map(.name != "v1") | all)' artifacts/manifests.yaml > artifacts/experimental-manifests.yaml


##@ Coverage

COVERAGE_DIR ?= coverage
Expand Down
Loading