v0.4.2 #30
Workflow file for this run
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
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 |