Skip to content

Commit

Permalink
PyPI workflow: re-introduce upload job (#18)
Browse files Browse the repository at this point in the history
* PyPI workflow: re-introduce upload job

* another attempt

* another attempt

* Use Packages

* update if condition
  • Loading branch information
andersy005 authored Aug 25, 2022
1 parent c66e899 commit 8960bb2
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,35 @@ concurrency:
cancel-in-progress: true

jobs:
build-package:
build:
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/build-and-inspect-python-package@v1
uses: hynek/build-and-inspect-python-package@v1.3
id: distribution

upload:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'

steps:
- uses: actions/download-artifact@v3
with:
name: Packages
path: dist

- name: Check
run: |
ls -ltrh ${{ steps.distribution.outputs.dist }}
ls -ltrh dist
- name: Publish package to PyPI
if: github.event_name == 'release'
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
verbose: true
packages_dir: ${{ steps.distribution.outputs.dist }}

0 comments on commit 8960bb2

Please sign in to comment.