forked from envoyproxy/ai-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (58 loc) · 2.39 KB
/
Copy pathrelease.yaml
File metadata and controls
65 lines (58 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+**" # Ex. v0.2.0 v0.2.1-rc2
jobs:
docker_push:
name: Push Docker Images
uses: ./.github/workflows/docker_build_job.yaml
secrets: inherit
release:
needs: [docker_push]
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # gh release create requires contents:write
steps:
- name: Set HELM_CHART_VERSION and TAG envs
run: |
TAG="${GITHUB_REF#refs/tags/}"
echo "HELM_CHART_VERSION=${TAG}" >> $GITHUB_ENV
echo "HELM_CHART_VERSION_WITHOUT_V=$(echo ${TAG#v})" >> $GITHUB_ENV
echo "TAG=${TAG}" >> $GITHUB_ENV
# To include the helm chart in the release artifact, we build and push it here instead of the separate job.
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
- name: Login into DockerHub
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Push Helm chart
run: |
make helm-push HELM_CHART_VERSION=${HELM_CHART_VERSION}
make helm-push HELM_CHART_VERSION=${HELM_CHART_VERSION_WITHOUT_V}
- name: Build CLI release binaries
run: |
make build.aigw GOOS_LIST="linux" GOARCH_LIST="amd64 arm64"
# amd64 for macos is not available on archive-envoy for the last few table versions
# which in turn is used by EG's standalone mode used by aigw, so we skip it
make build.aigw GOOS_LIST="darwin" GOARCH_LIST="arm64"
- name: Create a release candidate
if: ${{ contains(github.ref, '-rc') }}
run: |
gh release create $TAG --prerelease --title $TAG --notes "Release candidate" \
./out/ai-gateway-crds-helm-${TAG}.tgz \
./out/ai-gateway-helm-${TAG}.tgz \
./out/aigw-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create a stable release
if: ${{ !contains(github.ref, '-rc') }}
run: |
gh release create $TAG --draft --title $TAG --notes "To be written by the release manager" \
./out/ai-gateway-crds-helm-${TAG}.tgz \
./out/ai-gateway-helm-${TAG}.tgz \
./out/aigw-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}