Skip to content

Commit

Permalink
Fix cd-pypi github action (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandorkertesz authored May 28, 2024
1 parent d16ac80 commit a11025a
Showing 1 changed file with 38 additions and 6 deletions.
44 changes: 38 additions & 6 deletions .github/workflows/cd-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,43 @@
name: cd

# on:
# push:
# tags:
# - '**'

# jobs:
# pypi:
# uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2
# secrets: inherit


on:
push:
tags:
- '**'
push: {}

release:
types: [created]

jobs:
pypi:
uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2
secrets: inherit
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/*

0 comments on commit a11025a

Please sign in to comment.