Skip to content

Commit 44053d6

Browse files
authored
Merge pull request #622 from Carreau/autorelease
2 parents d145e0b + fc801a2 commit 44053d6

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

.github/workflows/releases.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Wheels
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build_artifacts:
7+
name: Build wheel on ubuntu-latest
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
with:
15+
submodules: true
16+
17+
- uses: actions/setup-python@v1
18+
name: Install Python
19+
with:
20+
python-version: '3.8'
21+
22+
- name: Install PyBuild
23+
run: |
24+
python -m pip install build
25+
26+
- name: Build wheel and sdist
27+
run: |
28+
python -m build
29+
- uses: actions/upload-artifact@v1
30+
with:
31+
name: releases
32+
path: dist
33+
34+
test_dist_pypi:
35+
needs: [build_artifacts]
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/download-artifact@v1
39+
with:
40+
name: releases
41+
path: dist
42+
43+
- name: test
44+
run: |
45+
ls
46+
ls dist
47+
48+
upload_pypi:
49+
needs: [build_artifacts]
50+
runs-on: ubuntu-latest
51+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
52+
steps:
53+
- uses: pypa/gh-action-pypi-publish@master
54+
with:
55+
user: __token__
56+
password: ${{ secrets.pypi_password }}
57+
# To test: repository_url: https://test.pypi.org/legacy/

docs/contributing.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,11 @@ compatibility in some way.
330330
Release procedure
331331
~~~~~~~~~~~~~~~~~
332332

333+
.. note::
334+
335+
Most of the release process is now handled by github workflow which should
336+
automatically push a release to PyPI if a tag is pushed.
337+
333338
Checkout and update the master branch::
334339

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

348353
Release source code to PyPI::
349354

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

353357
Obtain checksum for release to conda-forge::

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=40.8.0", "wheel"]
3+
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)