Skip to content

Fix cd-pypi github action #9

Fix cd-pypi github action

Fix cd-pypi github action #9

Workflow file for this run

name: cd
# on:
# push:
# tags:
# - '**'
# jobs:
# pypi:
# uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2
# secrets: inherit
on:
push: {}
release:
types: [created]
jobs:
deploy:
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m build
twine upload dist/*