|
52 | 52 | uses: actions/setup-python@v2 |
53 | 53 | with: |
54 | 54 | python-version: "3.13" |
55 | | - |
| 55 | + |
56 | 56 | - name: Create Conda environment file |
57 | 57 | run: | |
58 | 58 | python -m pip install pyyaml |
@@ -96,45 +96,50 @@ jobs: |
96 | 96 | verbose: true # optional (default = false) |
97 | 97 | token: ${{ secrets.CODECOV_TOKEN }} # required |
98 | 98 |
|
99 | | - distribute: |
100 | | - name: Distributing from 3.11 |
101 | | - needs: build-and-test |
102 | | - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') |
| 99 | + build_sdist: |
| 100 | + name: Build source distribution |
103 | 101 | runs-on: ubuntu-latest |
| 102 | + steps: |
| 103 | + - uses: actions/checkout@v5 |
| 104 | + with: |
| 105 | + fetch-depth: 0 |
| 106 | + |
| 107 | + - name: Build sdist |
| 108 | + run: pipx run build --sdist -Csetup-args="-Ddist_ignore_mkl_dep=true" |
| 109 | + |
| 110 | + - uses: actions/upload-artifact@v4 |
| 111 | + with: |
| 112 | + name: cibw-sdist |
| 113 | + path: dist/*.tar.gz |
| 114 | + |
| 115 | + release: |
| 116 | + needs: [ |
| 117 | + build_sdist |
| 118 | + ] |
| 119 | + runs-on: ubuntu-latest |
| 120 | + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') |
104 | 121 | defaults: |
105 | 122 | run: |
106 | 123 | shell: bash -l {0} |
107 | | - |
108 | 124 | steps: |
109 | | - - uses: actions/checkout@v4 |
110 | | - - name: Setup Conda |
111 | | - uses: conda-incubator/setup-miniconda@v3 |
| 125 | + - uses: actions/download-artifact@v4 |
112 | 126 | with: |
113 | | - python-version: "3.11" |
114 | | - channels: defaults |
115 | | - channel-priority: true |
116 | | - activate-environment: dev |
| 127 | + # unpacks all CIBW artifacts into dist/ |
| 128 | + pattern: cibw-* |
| 129 | + path: dist |
| 130 | + merge-multiple: true |
117 | 131 |
|
118 | | - - name: Install Env |
119 | | - run: | |
120 | | - conda info |
121 | | - conda list |
122 | | - conda config --show |
123 | | -
|
124 | | - - name: Create environment |
125 | | - run: | |
126 | | - conda install --quiet --yes -c conda-forge \ |
127 | | - pip numpy scipy cython mkl=2023 \ |
128 | | - mkl-devel pkg-config meson-python meson ninja setuptools_scm \ |
129 | | - python-build |
130 | | -
|
131 | | - - name: Generate Source Distribution |
132 | | - run: | |
133 | | - python -m build --no-isolation --skip-dependency-check --sdist . |
| 132 | + - name: Release to github |
| 133 | + uses: softprops/action-gh-release@v2 |
| 134 | + with: |
| 135 | + files: dist/* |
| 136 | + generate_release_notes: true |
| 137 | + prerelease: false |
134 | 138 |
|
135 | | - - name: pypi-publish |
136 | | - uses: pypa/gh-action-pypi-publish@v1.4.2 |
| 139 | + - name: Upload wheels to pypi |
| 140 | + uses: pypa/gh-action-pypi-publish@release/v1 |
137 | 141 | with: |
138 | 142 | user: __token__ |
139 | 143 | password: ${{ secrets.PYPI_API_TOKEN }} |
140 | | - skip_existing: true |
| 144 | + skip-existing: true |
| 145 | + packages-dir: ./dist/ |
0 commit comments