-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d16ac80
commit a11025a
Showing
1 changed file
with
38 additions
and
6 deletions.
There are no files selected for viewing
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
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/* |