feat(#384): Implement sandbox environment for developer testing #3
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: SDK Packages | |
| on: | |
| push: | |
| tags: | |
| - 'sdk-v*' | |
| pull_request: | |
| paths: | |
| - 'sdks/**' | |
| - 'docs/openapi.yaml' | |
| - 'scripts/generate-sdks.js' | |
| - '.github/workflows/sdk-publish.yml' | |
| jobs: | |
| validate-sdks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| - run: npm ci --legacy-peer-deps | |
| - run: npm run sdk:generate | |
| - run: npm run sdk:test:js | |
| - run: pip install -e sdks/python requests | |
| - run: npm run sdk:test:python | |
| - run: npm run sdk:test:go | |
| publish-javascript: | |
| needs: validate-sdks | |
| if: startsWith(github.ref, 'refs/tags/sdk-v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: npm ci --legacy-peer-deps | |
| - run: npm --prefix sdks/javascript publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |