You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This workflow will upload a Python Package using Twine when a release is created
2
2
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3
-
4
3
# This workflow uses actions that are not certified by GitHub.
5
4
# They are provided by a third-party and are governed by
6
5
# separate terms of service, privacy policy, and support
7
6
# documentation.
8
-
9
7
name: Upload Python Package
10
-
11
8
on:
12
9
release:
13
10
types: [published]
14
-
15
11
permissions:
16
12
contents: read
17
-
18
13
jobs:
19
14
deploy-pypi:
20
15
runs-on: ubuntu-latest
21
16
steps:
22
17
- uses: actions/checkout@v4
23
-
- name: Set up Python
24
-
uses: actions/setup-python@v5
18
+
- name: Install uv
19
+
uses: astral-sh/setup-uv@v3
25
20
with:
26
-
python-version: 3.12
21
+
version: "latest"
22
+
- name: Set up Python
23
+
run: uv python install 3.12
27
24
- name: Check versions
28
25
run: |
29
-
pip install -U pip requests
26
+
uv pip install --system requests
30
27
python3 .github/check_version.py
31
-
- name: Install dependencies
32
-
run: |
33
-
python -m pip install --upgrade pip
34
-
pip install hatch==1.13.0 hatchling==1.25.0
35
28
- name: Build package
36
-
run: hatch build -c
29
+
run: uv build
37
30
- name: Publish package
38
31
uses: pypa/gh-action-pypi-publish@release/v1
39
32
with:
40
33
user: __token__
41
34
password: ${{ secrets.PYPI_TOKEN }}
42
-
43
35
publish-to-conda:
44
36
runs-on: ubuntu-24.04
45
37
needs: [ deploy-pypi ]
@@ -64,8 +56,8 @@ jobs:
64
56
shell: bash -l {0}
65
57
run: codecarbon --help
66
58
- name: Conda upload already build package
67
-
# This shell is made necessary by https://github.com/conda-incubator/setup-miniconda/issues/128
0 commit comments