78
78
upstream
79
79
name : release_dist
80
80
81
- sdists_for_pypi :
81
+ sdists :
82
82
83
83
runs-on : ubuntu-latest
84
84
env :
@@ -102,15 +102,6 @@ jobs:
102
102
run : |
103
103
conda install --yes python-build
104
104
python -m build --sdist --no-isolation --outdir dist .
105
-
106
- - name : Old sagemath-standard
107
- run : |
108
- sudo DEBIAN_FRONTEND=noninteractive apt-get update
109
- sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian _bootstrap _prereq)
110
- ./bootstrap
111
- ./configure
112
- make pypi-sdists V=0
113
- mv upstream/sage*.tar.gz dist/
114
105
ls -l dist
115
106
116
107
- uses : actions/upload-artifact@v4
@@ -127,92 +118,37 @@ jobs:
127
118
if : env.CAN_DEPLOY == 'true'
128
119
129
120
release :
130
-
131
- needs : [release_dist, sdists_for_pypi]
121
+ needs : [release_dist, sdists]
132
122
runs-on : ubuntu-latest
133
- if : (success() || failure()) && github.repository == 'sagemath/sage' && startsWith(github.ref, 'refs/tags/')
123
+ if : github.ref_type == 'tag'
124
+ permissions :
125
+ contents : write
134
126
steps :
135
127
- uses : actions/download-artifact@v4
136
128
with :
137
129
name : release_dist
130
+
138
131
- uses : actions/download-artifact@v4
139
132
with :
140
133
name : dist
141
134
path : dist
142
- - name : Create release
143
- env :
144
- GITHUB_PAT : ${{ secrets.RELEASE_CREATION_TOKEN }}
145
- run : |
146
- latest_release_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases \
147
- | jq -r 'sort_by(.created_at) | last(.[]).tag_name')
148
- release_notes=$(curl -s \
149
- -X POST \
150
- -H "Accept: application/vnd.github+json" \
151
- -H "Authorization: Bearer $GITHUB_PAT" \
152
- -H "X-GitHub-Api-Version: 2022-11-28" \
153
- https://api.github.com/repos/${{ github.repository }}/releases/generate-notes \
154
- -d "{
155
- \"tag_name\": \"${{ github.ref_name }}\",
156
- \"previous_tag_name\": \"$latest_release_tag\"
157
- }" | jq -r '.body')
158
- # escape special characters for json
159
- release_notes=$(jq -R -s '.' <<< "$release_notes")
160
- curl -L \
161
- -X POST \
162
- -H "Accept: application/vnd.github+json" \
163
- -H "Authorization: Bearer $GITHUB_PAT" \
164
- -H "X-GitHub-Api-Version: 2022-11-28" \
165
- https://api.github.com/repos/${{ github.repository }}/releases \
166
- -d "{
167
- \"tag_name\": \"${{ github.ref_name }}\",
168
- \"prerelease\": ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }},
169
- \"body\": $release_notes
170
- }"
135
+
171
136
- name : Create release assets
172
137
uses : softprops/action-gh-release@v2
173
138
with :
174
139
files : |
175
140
dist/*
176
141
upstream/*
177
- token : ${{ secrets.GITHUB_TOKEN }}
178
- tag_name : ${{ github.ref_name }}
179
- permissions :
180
- contents : write
181
-
182
- noarch_wheels_for_pypi :
183
-
184
- runs-on : ubuntu-latest
185
- env :
186
- CAN_DEPLOY : ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' && github.event_name != 'pull_request' }}
187
- steps :
188
- - uses : actions/checkout@v4
189
- - name : Install bootstrap prerequisites
190
- run : |
191
- sudo DEBIAN_FRONTEND=noninteractive apt-get update
192
- sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian _bootstrap _prereq)
193
- - name : make pypi-noarch-wheels
194
- run : |
195
- ./bootstrap
196
- ./configure
197
- make pypi-noarch-wheels V=0
198
- (mkdir dist && mv venv/var/lib/sage/wheels/sage*-none-any.whl dist/)
199
- ls -l dist
200
- - uses : actions/upload-artifact@v4
201
- with :
202
- path : " dist/*.whl"
203
- name : noarch-wheels
204
- - uses : pypa/gh-action-pypi-publish@release/v1
205
- with :
206
- user : __token__
207
- password : ${{ secrets.SAGEMATH_PYPI_API_TOKEN }}
208
- skip-existing : true
209
- verbose : true
210
- if : env.CAN_DEPLOY == 'true'
142
+ token : ${{ secrets.RELEASE_CREATION_TOKEN }}
143
+ generate_release_notes : true
144
+ prerelease : ${{ contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}
211
145
212
146
build_wheels :
147
+ # Temporarily disabled due to build errors
148
+ if : false
213
149
name : wheels ${{ matrix.build }}*_${{ matrix.arch }}
214
150
runs-on : ${{ matrix.os }}
215
- needs : sdists_for_pypi
151
+ needs : sdists
216
152
strategy :
217
153
fail-fast : false
218
154
matrix :
@@ -293,10 +229,6 @@ jobs:
293
229
(cd unpacked && tar xfz - ) < $sdist
294
230
done
295
231
296
- - name : sagemath-objects
297
- run : |
298
- "${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*objects*
299
-
300
232
- name : sagemath-bliss
301
233
run : |
302
234
"${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*bliss*
0 commit comments