Spaces:
Sleeping
Sleeping
| name: Publish Packages | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| test_pypi: | |
| description: 'Publish to TestPyPI instead of PyPI' | |
| required: false | |
| default: 'false' | |
| type: choice | |
| options: | |
| - 'true' | |
| - 'false' | |
| jobs: | |
| # ββ ace-framework (Python) ββββββββββββββββββββββββββββββββββββββββββ | |
| build-ace: | |
| name: Build ace-framework | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| - name: Build package | |
| run: python -m build | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ace-framework-dist | |
| path: dist/ | |
| # ββ kayba-tracing (Python) βββββββββββββββββββββββββββββββββββββββββ | |
| build-kayba-tracing: | |
| name: Build kayba-tracing | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| - name: Build package | |
| run: python -m build sdk/python | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: kayba-tracing-dist | |
| path: sdk/python/dist/ | |
| # ββ @kayba_ai/tracing (TypeScript) ββββββββββββββββββββββββββββββββββββ | |
| build-kayba-tracing-ts: | |
| name: Build @kayba_ai/tracing | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: sdk/typescript | |
| - name: Build | |
| run: npm run build | |
| working-directory: sdk/typescript | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: kayba-tracing-ts-dist | |
| path: | | |
| sdk/typescript/dist/ | |
| sdk/typescript/package.json | |
| # ββ @kayba_ai/openclaw-tracing (TypeScript) βββββββββββββββββββββββββββ | |
| build-openclaw-tracing: | |
| name: Build @kayba_ai/openclaw-tracing | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: sdk/openclaw | |
| - name: Build | |
| run: npm run build | |
| working-directory: sdk/openclaw | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: openclaw-tracing-dist | |
| path: | | |
| sdk/openclaw/dist/ | |
| sdk/openclaw/package.json | |
| sdk/openclaw/openclaw.plugin.json | |
| sdk/openclaw/README.md | |
| # ββ Publish to TestPyPI ββββββββββββββββββββββββββββββββββββββββββββ | |
| publish-to-testpypi: | |
| name: Publish ace-framework to TestPyPI | |
| if: github.event.inputs.test_pypi == 'true' || github.event_name == 'workflow_dispatch' | |
| needs: [build-ace] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: testpypi | |
| url: https://test.pypi.org/project/ace-framework/ | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download all the dists | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ace-framework-dist | |
| path: dist/ | |
| - name: Publish to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| skip-existing: true | |
| publish-kayba-tracing-to-testpypi: | |
| name: Publish kayba-tracing to TestPyPI | |
| if: github.event.inputs.test_pypi == 'true' || github.event_name == 'workflow_dispatch' | |
| needs: [build-kayba-tracing] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: testpypi | |
| url: https://test.pypi.org/project/kayba-tracing/ | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download all the dists | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: kayba-tracing-dist | |
| path: dist/ | |
| - name: Publish to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| skip-existing: true | |
| # ββ Publish to PyPI ββββββββββββββββββββββββββββββββββββββββββββββββ | |
| publish-to-pypi: | |
| name: Publish ace-framework to PyPI | |
| if: github.event_name == 'release' | |
| needs: [build-ace] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/ace-framework/ | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download all the dists | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ace-framework-dist | |
| path: dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| publish-kayba-tracing-to-pypi: | |
| name: Publish kayba-tracing to PyPI | |
| if: github.event_name == 'release' | |
| needs: [build-kayba-tracing] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/kayba-tracing/ | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download all the dists | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: kayba-tracing-dist | |
| path: dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| # ββ Publish to npm βββββββββββββββββββββββββββββββββββββββββββββββββ | |
| publish-to-npm: | |
| name: Publish @kayba_ai/tracing to npm | |
| if: github.event_name == 'release' | |
| needs: [build-kayba-tracing-ts] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: npm | |
| url: https://www.npmjs.com/package/@kayba_ai/tracing | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: sdk/typescript | |
| - name: Build | |
| run: npm run build | |
| working-directory: sdk/typescript | |
| - name: Publish to npm | |
| run: npm publish --access public | |
| working-directory: sdk/typescript | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| publish-openclaw-tracing-to-npm: | |
| name: Publish @kayba_ai/openclaw-tracing to npm | |
| if: github.event_name == 'release' | |
| needs: [build-openclaw-tracing] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: npm | |
| url: https://www.npmjs.com/package/@kayba_ai/openclaw-tracing | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: sdk/openclaw | |
| - name: Build | |
| run: npm run build | |
| working-directory: sdk/openclaw | |
| - name: Publish to npm | |
| run: npm publish --access public | |
| working-directory: sdk/openclaw | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |