-
Notifications
You must be signed in to change notification settings - Fork 10
245 lines (238 loc) · 8.69 KB
/
Copy pathrelease.yaml
File metadata and controls
245 lines (238 loc) · 8.69 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
name: release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
tag: ${{ steps.version_tag.outputs.TAG }}
agents: ${{ steps.version_teal_agents.outputs.VERSION }}
ao: ${{ steps.version_ao.outputs.VERSION }}
services: ${{ steps.version_ao_services.outputs.VERSION }}
co: ${{ steps.version_co.outputs.VERSION }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.TEAL_AGENTS_BOT }}
persist-credentials: true
fetch-depth: 0
- name: Setup uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Get overall version tag
id: version_tag
working-directory: ./shared/ska_utils
run: |
make sync
uv run hatch version release
VERSION=$( uv run hatch version )
echo "TAG=v$VERSION" >> $GITHUB_OUTPUT
- name: Get teal-agents release version
id: version_teal_agents
working-directory: ./src/sk-agents
run: |
make sync
uv run hatch version release
VERSION=$( uv run hatch version)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "Teal-agents release version: $VERSION"
- name: Get ao release version
id: version_ao
working-directory: ./src/orchestrators/assistant-orchestrator/orchestrator
run: |
make sync
uv run hatch version release
VERSION=$( uv run hatch version )
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "AO release version: $VERSION"
- name: Get ao-services release version
id: version_ao_services
working-directory: ./src/orchestrators/assistant-orchestrator/services
run: |
make sync
uv run hatch version release
VERSION=$( uv run hatch version )
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "AO-services release version: $VERSION"
- name: Get co release version
id: version_co
working-directory: ./src/orchestrators/collab-orchestrator/orchestrator
run: |
make sync
uv run hatch version release
VERSION=$( uv run hatch version )
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "CO release version: $VERSION"
- name: Push release updates
run: |
git checkout ${{ github.ref_name }}
git config --global user.name "Teal Agents Bot"
git config --global user.email " "
git tag -a "${{ steps.version_tag.outputs.TAG }}" -m "Release ${{ steps.version_tag.outputs.TAG }}"
git commit -am "bump version [skip ci]"
git push --set-upstream origin ${{ github.ref_name }} --follow-tags
- name: Build ska-utils python pkg
working-directory: ./shared/ska_utils
run: |
make sync
uv build
- name: Build sk-agents python pkg
working-directory: ./src/sk-agents
run: |
make sync
uv build
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.version_tag.outputs.TAG }}
name: Release ${{ steps.version_tag.outputs.TAG }}
artifacts: 'shared/ska_utils/dist/*.whl,src/sk-agents/dist/*.whl'
generateReleaseNotes: true
build-teal-agents:
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: true
- name: Build Docker image
run: |
docker build -t ghcr.io/teal-agents/teal-agents:${{ needs.release.outputs.agents }} -f teal-agents.Dockerfile .
docker tag ghcr.io/teal-agents/teal-agents:${{ needs.release.outputs.agents }} ghcr.io/teal-agents/teal-agents:latest
- name: Log in to Docker registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker image
run: |
docker push ghcr.io/teal-agents/teal-agents:${{ needs.release.outputs.agents }}
docker push ghcr.io/teal-agents/teal-agents:latest
build-ao:
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: true
- name: Build Docker image
run: |
docker build -t ghcr.io/teal-agents/ao:${{ needs.release.outputs.ao }} -f ao.Dockerfile .
docker tag ghcr.io/teal-agents/ao:${{ needs.release.outputs.ao }} ghcr.io/teal-agents/ao:latest
- name: Log in to Docker registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker image
run: |
docker push ghcr.io/teal-agents/ao:${{ needs.release.outputs.ao }}
docker push ghcr.io/teal-agents/ao:latest
build-ao-services:
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: true
- name: Build Docker image
run: |
docker build -t ghcr.io/teal-agents/ao-services:${{ needs.release.outputs.services }} -f ao-services.Dockerfile .
docker tag ghcr.io/teal-agents/ao-services:${{ needs.release.outputs.services }} ghcr.io/teal-agents/ao-services:latest
- name: Log in to Docker registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker image
run: |
docker push ghcr.io/teal-agents/ao-services:${{ needs.release.outputs.services }}
docker push ghcr.io/teal-agents/ao-services:latest
build-co:
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: true
- name: Build Docker image
run: |
docker build -t ghcr.io/teal-agents/co:${{ needs.release.outputs.co }} -f co.Dockerfile .
docker tag ghcr.io/teal-agents/co:${{ needs.release.outputs.co }} ghcr.io/teal-agents/co:latest
- name: Log in to Docker registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker image
run: |
docker push ghcr.io/teal-agents/co:${{ needs.release.outputs.co }}
docker push ghcr.io/teal-agents/co:latest
next-dev-version:
runs-on: ubuntu-latest
needs: [release, build-teal-agents, build-ao, build-ao-services, build-co]
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.TEAL_AGENTS_BOT }}
persist-credentials: true
fetch-depth: 0
- name: Setup uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Pull release versions
run: |
git checkout ${{ github.ref_name }}
git pull origin ${{ github.ref_name }}
- name: Update ska-utils version
working-directory: ./shared/ska_utils
run: |
make sync
uv run hatch version patch,dev
VERSION=$( uv run hatch version )
- name: Update sk-agents version
working-directory: ./src/sk-agents
run: |
make sync
uv run hatch version patch,dev
VERSION=$( uv run hatch version )
- name: Update ao version
working-directory: ./src/orchestrators/assistant-orchestrator/orchestrator
run: |
make sync
uv run hatch version patch,dev
VERSION=$( uv run hatch version )
- name: Update ao-services version
working-directory: ./src/orchestrators/assistant-orchestrator/services
run: |
make sync
uv run hatch version patch,dev
VERSION=$( uv run hatch version )
- name: Update co version
working-directory: ./src/orchestrators/collab-orchestrator/orchestrator
run: |
make sync
uv run hatch version patch,dev
VERSION=$( uv run hatch version )
- name: Push version bumps
run: |
git config --global user.name "Teal Agents Bot"
git config --global user.email " "
git commit -am "bump dev version [skip ci]"
git push --set-upstream origin ${{ github.ref_name }}