11name : Tag and Push
22
33on :
4- release :
5- types : [created]
4+ push :
5+ tags :
6+ - " v*.*.*"
67 workflow_dispatch :
78 inputs :
89 version :
@@ -18,48 +19,71 @@ jobs:
1819 contents : read
1920 packages : write
2021 steps :
21- - name : ' Checkout GitHub Action'
22- uses : actions/checkout@main
22+ - name : ' Checkout GitHub Action'
23+ uses : actions/checkout@main
2324
24- - name : Login to GitHub Container Registry
25- uses : docker/login-action@v3
26- with :
27- registry : ghcr.io
28- username : ${{ github.actor }}
29- password : ${{ secrets.GITHUB_TOKEN }}
25+ - name : Login to GitHub Container Registry
26+ uses : docker/login-action@v3
27+ with :
28+ registry : ghcr.io
29+ username : ${{ github.actor }}
30+ password : ${{ secrets.GITHUB_TOKEN }}
3031
31- - name : ' Build Images'
32- run : |
33- # if workflow_dispatch is used, use the version input
34- if [ -n "${{ github.event.inputs.version }}" ]; then
35- export VERSION=${{ github.event.inputs.version }}
36- else
37- export VERSION=$(echo "$GITHUB_REF" | cut -c8-)
38- fi
39- make build
40- make push
32+ - name : ' Build Images'
33+ run : |
34+ # if workflow_dispatch is used, use the version input
35+ if [ -n "${{ github.event.inputs.version }}" ]; then
36+ export VERSION=${{ github.event.inputs.version }}
37+ else
38+ export VERSION=$(echo "$GITHUB_REF" | cut -c8-)
39+ fi
40+ make build
41+ make push
4142 push-helm-chart :
4243 runs-on : ubuntu-latest
4344 permissions :
4445 contents : read
4546 packages : write
4647 steps :
47- - name : ' Checkout GitHub Action'
48- uses : actions/checkout@main
48+ - name : ' Checkout GitHub Action'
49+ uses : actions/checkout@main
4950
50- - name : Login to GitHub Container Registry
51- uses : docker/login-action@v3
52- with :
53- registry : ghcr.io
54- username : ${{ github.actor }}
55- password : ${{ secrets.GITHUB_TOKEN }}
51+ - name : Login to GitHub Container Registry
52+ uses : docker/login-action@v3
53+ with :
54+ registry : ghcr.io
55+ username : ${{ github.actor }}
56+ password : ${{ secrets.GITHUB_TOKEN }}
5657
57- - name : ' Build Image'
58- run : |
59- # if workflow_dispatch is used, use the version input
60- if [ -n "${{ github.event.inputs.version }}" ]; then
61- export VERSION=${{ github.event.inputs.version }}
62- else
63- export VERSION=$(echo "$GITHUB_REF" | cut -c8-)
64- fi
65- make helm-publish
58+ - name : ' Build Image'
59+ run : |
60+ # if workflow_dispatch is used, use the version input
61+ if [ -n "${{ github.event.inputs.version }}" ]; then
62+ export VERSION=${{ github.event.inputs.version }}
63+ else
64+ export VERSION=$(echo "$GITHUB_REF" | cut -c8-)
65+ fi
66+ make helm-publish
67+ release :
68+ runs-on : ubuntu-latest
69+ permissions :
70+ contents : write
71+ steps :
72+ - name : Checkout
73+ uses : actions/checkout@v4
74+ - name : Build
75+ run : |
76+ # if workflow_dispatch is used, use the version input
77+ if [ -n "${{ github.event.inputs.version }}" ]; then
78+ export VERSION=${{ github.event.inputs.version }}
79+ else
80+ export VERSION=$(echo "$GITHUB_REF" | cut -c8-)
81+ fi
82+ make build-cli
83+ - name : Release
84+ uses : softprops/action-gh-release@v2
85+ if : startsWith(github.ref, 'refs/tags/')
86+ with :
87+ files : |
88+ go/bin/kagent-*
89+ helm/kagent-*.tgz
0 commit comments