-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (43 loc) · 1.2 KB
/
publish.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
38
39
40
41
42
43
44
45
name: Upload Python Package
on:
release:
types: [created]
jobs:
deploy:
if: github.repository == 'xgcm/aerobulk-python'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy setuptools setuptools-scm wheel twine
- name: Build tarball
run: python setup.py sdist
- name: Check dist
run: ls -la dist
- name: Check version
run: python setup.py --version
- name: Check built artifacts
run: |
python -m twine check dist/*
pwd
if [ -f dist/aerobulk-python-0.0.0.tar.gz ]; then
echo "❌ INVALID VERSION NUMBER"
exit 1
else
echo "✅ Looks good"
fi
- name: Publish a Package to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
verify_metadata: true