CADE-482 Fix job 'Upgrade api-specification' fails in api-clients (#435) #76
This file contains 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 @mirohq/miro-api package to npm | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/publish.yml | |
- packages/miro-api/package.json | |
- packages/miro-api-python/pyproject.toml | |
jobs: | |
publish-node-to-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- run: yarn | |
working-directory: packages/miro-api | |
- run: yarn build | |
working-directory: packages/miro-api | |
# This step will look at version in package.json, compare it to NPM version and | |
# if the versions are different it will publish the package | |
- id: publish_miro_node | |
name: Publish miro-api package to NPM | |
uses: JS-DevTools/[email protected] | |
with: | |
token: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
package: packages/miro-api/package.json | |
publish-python-to-pypi: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- run: pip install poetry~=1.8.5 | |
- name: Build the packages | |
run: poetry build | |
working-directory: packages/miro-api-python | |
- name: Publish to pypi | |
run: | | |
poetry install | |
poetry run twine upload dist/* | |
working-directory: packages/miro-api-python | |
env: | |
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |