Prepare v0.2.0 beta release #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: publish-sdks | |
| on: | |
| push: | |
| tags: ["v*.*.*"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| typescript: | |
| name: npm package | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: sdk/typescript | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install dependencies | |
| run: npm install --no-audit --no-fund | |
| - name: Build | |
| run: npm run build | |
| - name: Test | |
| run: npm test | |
| - name: Check version matches tag | |
| run: | | |
| TAG="${GITHUB_REF_NAME#v}" | |
| VERSION="$(node -p "require('./package.json').version")" | |
| test "$VERSION" = "$TAG" | |
| - name: Publish to npm | |
| run: npm publish --access public --provenance | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| python: | |
| name: PyPI package | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/openclaw-managed-agents/ | |
| defaults: | |
| run: | |
| working-directory: sdk/python | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install build tooling | |
| run: python -m pip install --upgrade build twine | |
| - name: Check version matches tag | |
| run: | | |
| TAG="${GITHUB_REF_NAME#v}" | |
| VERSION="$(python - <<'PY' | |
| import tomllib | |
| with open("pyproject.toml", "rb") as f: | |
| print(tomllib.load(f)["project"]["version"]) | |
| PY | |
| )" | |
| test "$VERSION" = "$TAG" | |
| - name: Build | |
| run: python -m build | |
| - name: Check package metadata | |
| run: python -m twine check dist/* | |
| - name: Import smoke | |
| run: | | |
| python -m pip install dist/*.whl | |
| python - <<'PY' | |
| from openclaw_managed_agents import OpenClawClient, Vault, VaultCredential | |
| print(OpenClawClient, Vault, VaultCredential) | |
| PY | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: sdk/python/dist |