80
80
cache-dependency-path : pyproject.toml
81
81
82
82
- name : Verify wheel
83
+ if : matrix.python-version == '3.12'
83
84
run : |
84
85
python -m pip install --upgrade pip build twine
85
86
python -m build && python -m twine check dist/*
@@ -115,6 +116,14 @@ jobs:
115
116
env :
116
117
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
117
118
119
+ - name : Upload distribution artifacts
120
+ if : matrix.python-version == '3.12'
121
+ uses : actions/upload-artifact@v4
122
+ with :
123
+ name : dist-artifacts
124
+ path : dist/
125
+ retention-days : 7
126
+
118
127
release :
119
128
name : Release
120
129
if : |
@@ -126,27 +135,23 @@ jobs:
126
135
- downstream
127
136
runs-on : ubuntu-24.04
128
137
steps :
129
- - name : Checkout repository
130
- uses : actions/checkout@v4
138
+ - name : Download distribution artifacts
139
+ uses : actions/download-artifact@v4
140
+ with :
141
+ name : dist-artifacts
142
+ path : dist/
131
143
132
144
- name : Set up Python
133
145
uses : actions/setup-python@v5
134
146
with :
135
- python-version : ${{ env.MAIN_PYTHON_VERSION }}
136
-
137
- - name : Install dependencies
138
- run : |
139
- python -m pip install --upgrade pip build twine
140
-
141
- - name : Build artifacts
142
- run : |
143
- python -m build && python -m twine check dist/*
147
+ python-version : " 3.12"
144
148
145
149
- name : Publish to PyPI
146
150
env :
147
151
TWINE_USERNAME : __token__
148
152
TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
149
153
run : |
154
+ python -m pip install twine
150
155
python -m twine upload --skip-existing ./**/*.whl
151
156
python -m twine upload --skip-existing ./**/*.tar.gz
152
157
0 commit comments