Skip to content

Use github workflow to build sdist/wheel and upload. #622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Wheels

on: [push, pull_request]

jobs:
build_artifacts:
name: Build wheel on ubuntu-latest
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v1
with:
submodules: true

- uses: actions/setup-python@v1
name: Install Python
with:
python-version: '3.8'

- name: Install PyBuild
run: |
python -m pip install build

- name: Build wheel and sdist
run: |
python -m build
- uses: actions/upload-artifact@v1
with:
name: releases
path: dist

test_dist_pypi:
needs: [build_artifacts]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v1
with:
name: releases
path: dist

- name: test
run: |
ls
ls dist

upload_pypi:
needs: [build_artifacts]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/
6 changes: 5 additions & 1 deletion docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,11 @@ compatibility in some way.
Release procedure
~~~~~~~~~~~~~~~~~

.. note::

Most of the release process is now handled by github workflow which should
automatically push a release to PyPI if a tag is pushed.

Checkout and update the master branch::

$ git checkout master
Expand All @@ -347,7 +352,6 @@ Tag the version (where "X.X.X" stands for the version number, e.g., "2.2.0")::

Release source code to PyPI::

$ python setup.py register sdist
$ twine upload dist/zarr-${version}.tar.gz

Obtain checksum for release to conda-forge::
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"