diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..dc63302 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,20 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile +{ + "name": "dev", + "image": "ghcr.io/ten-framework/ten_agent_build:0.2.3", + "customizations": { + "vscode": { + "extensions": [ + "ms-python.autopep8", + "ms-python.vscode-pylance", + "ms-python.python", + "ms-python.debugpy" + ] + } + }, + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/git:1": {} + } +} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0c85fff --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: CI + +on: + release: + types: [created] + push: + branches: + - "**" + paths-ignore: + - ".vscode/**" + - ".devcontainer/**" + - ".github/**" + - "!.github/workflows/ci.yml" + - "**.md" + pull_request: + paths-ignore: + - ".vscode/**" + - ".devcontainer/**" + - ".github/**" + - "!.github/workflows/ci.yml" + - "**.md" + +jobs: + ci: + runs-on: ubuntu-latest + container: + image: ghcr.io/ten-framework/ten_agent_build:0.2.3 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: "0" + submodules: "true" + + - name: Check ten dependencies + run: | + tman install + + - name: Release + if: startsWith(github.ref, 'refs/tags/') + run: | + # replace version by tag + jq '.version = "${{ github.ref_name }}"' manifest.json >manifest.gen.json + + # check after replace + diff manifest.gen.json manifest.json || true + mv manifest.gen.json manifest.json + jq . manifest.json + + # publish to store + tman --verbose --user-token ${{ secrets.TEN_CLOUD_STORE }} publish diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..27b55f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pyc +.ten diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..fcbe848 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "python.analysis.extraPaths": [ + ".ten/app/ten_packages/system/ten_runtime_python/interface", + ".ten/app/ten_packages/system/ten_ai_base/interface", + ], + "editor.formatOnSave": true, +} \ No newline at end of file