Skip to content

Commit

Permalink
Revert back to previous version of PyPI workflow (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 authored Aug 25, 2022
1 parent 8960bb2 commit a1879ab
Showing 1 changed file with 35 additions and 14 deletions.
49 changes: 35 additions & 14 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,53 @@ concurrency:
cancel-in-progress: true

jobs:
build:
build-artifacts:
runs-on: ubuntu-latest
if: github.repository == 'xarray-contrib/cupy-xarray'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build & inspect package
uses: hynek/[email protected]
id: distribution
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: 3.8

upload:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
- 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: |
git clean -xdf
git restore -SW .
python -m build --sdist --wheel .
- name: Check built artifacts
run: |
python -m twine check dist/*
pwd
if [ -f dist/cupy-xarray-0.0.0.tar.gz ]; then
echo "❌ INVALID VERSION NUMBER"
exit 1
else
echo "✅ Looks good"
fi
- uses: actions/upload-artifact@v3
with:
name: releases
path: dist

upload-to-pypi:
needs: build-artifacts
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: Packages
name: releases
path: dist

- name: Check
run: |
ls -ltrh dist
- name: Publish package to PyPI
uses: pypa/[email protected]
with:
Expand Down

0 comments on commit a1879ab

Please sign in to comment.