Skip to content

Releasing

Releasing #28

Workflow file for this run

name: Build & Release
run-name: 'Releasing'
on:
pull_request:
branches:
- main
types:
- closed
- opened
jobs:
publish-python-sdk:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Github Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install hatch
run: |
pip install hatch
- name: Build SDK
run: |
hatch build
- name: Publish Python 🐍 distributions 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_TOKEN }}
publish-node-sdk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org
cache: npm
cache-dependency-path: src/typescript/package-lock.json
- name: Install Node.js dependencies
working-directory: src/typescript
run: npm ci
- name: Configure npm for publish
working-directory: src/typescript
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: Release package
working-directory: src/typescript
run: npm run build && npm run publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}