Skip to content

Commit d2f2899

Browse files
author
Denis Jelovina
committed
Add promote-to-pypi workflow and update pyalp version to 0.8.18; enhance publishing steps
1 parent 13ce446 commit d2f2899

File tree

3 files changed

+71
-1
lines changed

3 files changed

+71
-1
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Promote release to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Git tag / release to promote (e.g. pyalp.v0.8.14)'
8+
required: true
9+
10+
jobs:
11+
promote:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
steps:
16+
- name: Checkout (for local scripts)
17+
uses: actions/checkout@v4
18+
19+
- name: Download release assets
20+
uses: softprops/action-download-release@v1
21+
with:
22+
tag: ${{ github.event.inputs.tag }}
23+
# downloads into ./release_assets by default
24+
25+
- name: List downloaded assets
26+
run: |
27+
echo "Assets in release_assets:"
28+
ls -la release_assets || true
29+
30+
- name: Publish to PyPI (alp-graphblas)
31+
uses: pypa/gh-action-pypi-publish@release/v1
32+
with:
33+
packages-dir: release_assets/
34+
env:
35+
TWINE_USERNAME: __token__
36+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/pyalp-publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ jobs:
207207
url: https://test.pypi.org/p/pyalp
208208
permissions:
209209
id-token: write
210+
contents: write
210211
steps:
211212
- name: Checkout repository (for tests)
212213
uses: actions/checkout@v4
@@ -226,6 +227,13 @@ jobs:
226227
packages-dir: dist/
227228
verbose: true
228229

230+
- name: Create GitHub Release and upload wheels
231+
uses: softprops/action-gh-release@v1
232+
with:
233+
tag_name: ${{ github.ref_name }}
234+
name: ${{ github.ref_name }}
235+
files: dist/*.whl
236+
229237
- name: Skip in-publish verification
230238
shell: bash
231239
run: |
@@ -280,3 +288,29 @@ jobs:
280288
# Run the smoke runner script for the backend for this matrix job
281289
echo "Running backend smoke runner for ${BACKEND}"
282290
python .github/scripts/run_backend_smoke_installed.py "${BACKEND}"
291+
292+
publish-to-pypi:
293+
needs: verify-installed
294+
runs-on: ubuntu-latest
295+
# This job publishes the already-built artifacts to the real PyPI index.
296+
# It requires a PyPI API token stored in the repository secrets as PYPI_API_TOKEN.
297+
steps:
298+
- name: Checkout repository
299+
uses: actions/checkout@v4
300+
with:
301+
fetch-depth: 0
302+
303+
- name: Download built wheels
304+
uses: actions/download-artifact@v4
305+
with:
306+
path: dist
307+
pattern: pyalp-wheels-*
308+
merge-multiple: true
309+
310+
- name: Publish to PyPI (alp-graphblas)
311+
uses: pypa/gh-action-pypi-publish@release/v1
312+
with:
313+
packages-dir: dist/
314+
env:
315+
TWINE_USERNAME: __token__
316+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

pyalp/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "pyalp"
7-
version = "0.8.17"
7+
version = "0.8.18"
88
description = "Python bindings for ALP GraphBLAS (minimal package layout)"
99
authors = [ { name = "ALP" } ]
1010
readme = "README.md"

0 commit comments

Comments
 (0)