-
-
Notifications
You must be signed in to change notification settings - Fork 288
71 lines (61 loc) · 1.58 KB
/
releases.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-python@v5.1.0
name: Install Python
with:
python-version: '3.9'
- name: Install PyBuild
run: |
python -m pip install 'build!=0.1' setuptools-scm
- name: Build wheel and sdist
run: |
python -m build
git describe
pwd
if [ -f dist/zarr-0.0.0.tar.gz ]; then
echo "WRONG VERSION NUMBER"
exit 1
else
echo "All seem good"
fi
- uses: actions/upload-artifact@v4
with:
name: releases
path: dist
test_dist_pypi:
needs: [build_artifacts]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
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: actions/download-artifact@v4
with:
name: releases
path: dist
- uses: pypa/gh-action-pypi-publish@v1.8.14
with:
user: __token__
password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/