-
Notifications
You must be signed in to change notification settings - Fork 6
37 lines (34 loc) · 866 Bytes
/
pypi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Publish to PyPI
on:
pull_request:
push:
branches:
- main
release:
types:
- published
jobs:
packages:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/seaduck
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
$CONDA/bin/python -m pip install build twine
- name: Build distributions
run: |
$CONDA/bin/python -m build
- name: Check wheels
run: |
cd dist || exit
$CONDA/bin/python -m pip install seaduck*.whl || exit
$CONDA/bin/python -m twine check * || exit
$CONDA/bin/python -c "import seaduck"
- name: Publish a Python distribution to PyPI
if: success() && github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1