Skip to content

Commit

Permalink
Add pypy.yaml to PR
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelavs committed May 5, 2022
1 parent a1be357 commit 7addc13
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Upload wrf-python to PyPI
on:
release:
types:
- published
jobs:
test-build:
if: github.repository == 'NCAR/wrf-python'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools setuptools-scm wheel twine check-manifest
- name: Build tarball and wheels
run: |
python setup.py sdist bdist_wheel
python -m pip wheel . -w dist --no-deps
- name: Test the artifacts
run: |
python -m twine check dist/*
publish:
needs: test-build
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools setuptools-scm wheel twine check-manifest
- name: Build tarball and wheels
run: |
python setup.py sdist bdist_wheel
python -m pip wheel . -w dist --no-deps
- name: Test the artifacts
run: |
python -m twine check dist/*
- name: Publish package to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
skip_existing: true
verbose: true

0 comments on commit 7addc13

Please sign in to comment.