88 release :
99 types : [published]
1010
11- env :
12- DEFAULT_PYTHON_VERSION : " 3.10"
13-
1411jobs :
15- build-Wheel :
12+ build-wheel :
1613 runs-on : ubuntu-latest
17- strategy :
18- matrix :
19- python-version : ["3.10","3.11","3.12"]
2014 steps :
2115 - uses : actions/checkout@v4
2216
2317 - name : Setup Python ${{ matrix.python-version }}
2418 uses : actions/setup-python@v5
2519 with :
26- python-version : ${{ matrix.python-version }}
20+ python-version : ' 3.10 '
2721
2822 - name : Install UV
2923 uses : astral-sh/setup-uv@v6
3024 with :
31- python-version : ${{ matrix.python }}
25+ python-version : ' 3.10 '
3226
3327 - name : Install dependencies
3428 shell : sh
@@ -40,17 +34,32 @@ jobs:
4034 run : uv run hatch build
4135
4236
43- - name : Get wheel file name
44- run : echo wheel_filename=$( ls *.whl ) >> $GITHUB_ENV
45- working-directory : ./dist
46-
47- - name : Test that wheel can be installed
48- run : uv run pip install dist/${{ env.wheel_filename }}
49-
50- - name : Upload wheel artifact
37+ - name : Store the distribution packages
5138 uses : actions/upload-artifact@v4
5239 with :
53- name : wheelfile_${{ matrix.python-version }}
54- path : dist/${{ env.wheel_filename }}
40+ name : python-package-distributions
41+ path : dist/
42+
43+ deploy :
44+ name : Upload release to PyPI
45+ needs :
46+ - build-wheel
47+ runs-on : ubuntu-latest
5548
56-
49+ # environment is used by PyPI Trusted Publisher and is strongly encouraged
50+ # https://docs.pypi.org/trusted-publishers/adding-a-publisher/
51+ environment :
52+ name : pypi
53+ url : https://pypi.org/p/datu-core
54+ permissions :
55+ # IMPORTANT: this permission is mandatory for Trusted Publishing
56+ id-token : write
57+
58+ steps :
59+ - name : Download all the dists
60+ uses : actions/download-artifact@v4
61+ with :
62+ name : python-package-distributions
63+ path : dist/
64+ - name : Publish distribution 📦 to PyPI
65+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments