|
78 | 78 | name: distributions-universal |
79 | 79 | path: ./dist |
80 | 80 |
|
| 81 | + - name: Filter distributions based on tag |
| 82 | + if: startsWith(github.ref, 'refs/tags') |
| 83 | + run: | |
| 84 | + TAG="${{ github.ref_name }}" |
| 85 | + echo "Tag: $TAG" |
| 86 | + ls -la dist/ |
| 87 | +
|
| 88 | + # Keep only the package matching the tag |
| 89 | + if [[ $TAG == viz-v* ]]; then |
| 90 | + find dist/ -type f ! -name 'vaex_viz-*' -delete |
| 91 | + elif [[ $TAG == hdf5-v* ]]; then |
| 92 | + find dist/ -type f ! -name 'vaex_hdf5-*' -delete |
| 93 | + elif [[ $TAG == server-v* ]]; then |
| 94 | + find dist/ -type f ! -name 'vaex_server-*' -delete |
| 95 | + elif [[ $TAG == astro-v* ]]; then |
| 96 | + find dist/ -type f ! -name 'vaex_astro-*' -delete |
| 97 | + elif [[ $TAG == jupyter-v* ]]; then |
| 98 | + find dist/ -type f ! -name 'vaex_jupyter-*' -delete |
| 99 | + elif [[ $TAG == ml-v* ]]; then |
| 100 | + find dist/ -type f ! -name 'vaex_ml-*' -delete |
| 101 | + elif [[ $TAG == graphql-v* ]]; then |
| 102 | + find dist/ -type f ! -name 'vaex_graphql-*' -delete |
| 103 | + elif [[ $TAG == contrib-v* ]]; then |
| 104 | + find dist/ -type f ! -name 'vaex_contrib-*' -delete |
| 105 | + elif [[ $TAG == v* ]]; then |
| 106 | + # Main vaex package (not vaex_*) |
| 107 | + find dist/ -type f ! -name 'vaex-*' -delete |
| 108 | + fi |
| 109 | +
|
| 110 | + echo "Filtered distributions:" |
| 111 | + ls -la dist/ |
| 112 | +
|
81 | 113 | # https://github.com/pypa/gh-action-pypi-publish#trusted-publishing |
82 | 114 | - name: Publish package distributions to PyPI |
83 | 115 | uses: pypa/gh-action-pypi-publish@v1.12.4 |
|
0 commit comments