|
1 | | -name: Build and upload to PyPI |
| 1 | +name: Build and upload to PyPi |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
|
8 | 8 | types: |
9 | 9 | - published |
10 | 10 |
|
11 | | - |
12 | | -concurrency: |
13 | | - group: "${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}" |
14 | | - cancel-in-progress: true |
15 | | - |
16 | | - |
17 | | -defaults: |
18 | | - run: |
19 | | - shell: bash -l {0} |
20 | | - |
21 | | - |
22 | 11 | jobs: |
23 | | - build_wheels: |
| 12 | + pypi_push: |
24 | 13 | environment: deploy |
25 | 14 | if: "github.repository == 'MDAnalysis/GridDataFormats'" |
26 | | - name: Build pure Python wheel |
| 15 | + name: Build, upload and test pure Python wheels |
27 | 16 | runs-on: ubuntu-latest |
28 | 17 |
|
29 | 18 | steps: |
30 | 19 | - uses: actions/checkout@v3 |
31 | | - with: |
32 | | - fetch-depth: 0 |
33 | | - |
34 | | - - name: setup_miniconda |
35 | | - uses: conda-incubator/setup-miniconda@v2 |
36 | | - with: |
37 | | - python-version: 3.9 |
38 | | - auto-update-conda: true |
39 | | - add-pip-as-python-dependency: true |
40 | | - architecture: x64 |
41 | | - |
42 | | - - name: install_deps |
43 | | - run: | |
44 | | - python -m pip install build |
45 | | -
|
46 | | - - name: build |
47 | | - run: | |
48 | | - python -m build --sdist --wheel --outdir dist/ |
49 | 20 |
|
50 | | - - name: publish_testpypi |
51 | | - # Upload to testpypi on every tag |
| 21 | + - name: testpypi_deploy |
| 22 | + uses: MDAnalysis/pypi-deployment@main |
52 | 23 | if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') |
53 | | - uses: pypa/gh-action-pypi-publish@release/v1 |
54 | 24 | with: |
55 | | - password: ${{ secrets.TEST_PYPI_API_TOKEN }} |
56 | | - repository_url: https://test.pypi.org/legacy/ |
| 25 | + token: ${{ secrets.TEST_PYPI_API_TOKEN }} |
| 26 | + test_submission: true |
| 27 | + package_name: GridDataFormats |
| 28 | + module_name: 'gridData' |
57 | 29 |
|
58 | | - - name: publish_pypi |
| 30 | + - name: pypi_deploy |
| 31 | + uses: MDAnalysis/pypi-deployment@main |
59 | 32 | if: github.event_name == 'release' && github.event.action == 'published' |
60 | | - uses: pypa/gh-action-pypi-publish@release/v1 |
61 | 33 | with: |
62 | | - password: ${{ secrets.PYPI_API_TOKEN }} |
| 34 | + token: ${{ secrets.PYPI_API_TOKEN }} |
| 35 | + package_name: GridDataFormats |
| 36 | + module_name: 'gridData' |
0 commit comments