Skip to content

Commit 9480e20

Browse files
committed
feat: add ci
1 parent a9a3642 commit 9480e20

File tree

4 files changed

+79
-0
lines changed

4 files changed

+79
-0
lines changed

.devcontainer/devcontainer.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
3+
{
4+
"name": "dev",
5+
"image": "ghcr.io/ten-framework/ten_agent_build:0.2.3",
6+
"customizations": {
7+
"vscode": {
8+
"extensions": [
9+
"ms-python.autopep8",
10+
"ms-python.vscode-pylance",
11+
"ms-python.python",
12+
"ms-python.debugpy"
13+
]
14+
}
15+
},
16+
// Features to add to the dev container. More info: https://containers.dev/features.
17+
"features": {
18+
"ghcr.io/devcontainers/features/git:1": {}
19+
}
20+
}

.github/workflows/ci.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
on:
4+
release:
5+
types: [created]
6+
push:
7+
branches:
8+
- "**"
9+
paths-ignore:
10+
- ".vscode/**"
11+
- ".devcontainer/**"
12+
- ".github/**"
13+
- "!.github/workflows/ci.yml"
14+
- "**.md"
15+
pull_request:
16+
paths-ignore:
17+
- ".vscode/**"
18+
- ".devcontainer/**"
19+
- ".github/**"
20+
- "!.github/workflows/ci.yml"
21+
- "**.md"
22+
23+
jobs:
24+
ci:
25+
runs-on: ubuntu-latest
26+
container:
27+
image: ghcr.io/ten-framework/ten_agent_build:0.2.3
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
fetch-depth: "0"
32+
submodules: "true"
33+
34+
- name: Check ten dependencies
35+
run: |
36+
tman install
37+
38+
- name: Release
39+
if: startsWith(github.ref, 'refs/tags/')
40+
run: |
41+
# replace version by tag
42+
jq '.version = "${{ github.ref_name }}"' manifest.json >manifest.gen.json
43+
44+
# check after replace
45+
diff manifest.gen.json manifest.json || true
46+
mv manifest.gen.json manifest.json
47+
jq . manifest.json
48+
49+
# publish to store
50+
tman --verbose --user-token ${{ secrets.TEN_CLOUD_STORE }} publish

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.pyc
2+
.ten

.vscode/settings.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"python.analysis.extraPaths": [
3+
".ten/app/ten_packages/system/ten_runtime_python/interface",
4+
".ten/app/ten_packages/system/ten_ai_base/interface",
5+
],
6+
"editor.formatOnSave": true,
7+
}

0 commit comments

Comments
 (0)