Skip to content

Commit bff4df5

Browse files
committed
actions: publish-wheels: add composite publishing action
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
1 parent bd7864b commit bff4df5

2 files changed

Lines changed: 91 additions & 0 deletions

File tree

12 KB
Binary file not shown.

actions/publish-wheels/action.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: 'Publish riscv64 Wheels and Document Release'
2+
description: >
3+
Checks out python-wheels, downloads a package's built wheel artifacts,
4+
publishes them to the GitLab PyPI Package Registry, and opens a pull
5+
request documenting the new version in docs/packages/. Wraps the publish
6+
job body shared by every build-<package>.yml workflow so it doesn't need
7+
to be duplicated per package.
8+
9+
inputs:
10+
11+
# ── Required ────────────────────────────────────────────────────────────────
12+
13+
artifact-pattern:
14+
description: >
15+
Pattern passed to actions/download-artifact to select this package's
16+
wheel artifacts, e.g. "numpy-2.5.1-*-manylinux_riscv64".
17+
required: true
18+
19+
gitlab-username:
20+
description: Passed through to the publish-to-gitlab action.
21+
required: true
22+
23+
gitlab-token:
24+
description: Passed through to the publish-to-gitlab action.
25+
required: true
26+
27+
gitlab-project-id:
28+
description: Passed through to the publish-to-gitlab action.
29+
required: true
30+
31+
gh-token:
32+
description: >
33+
GitHub token used to push the docs branch and open the docs PR.
34+
Composite actions cannot read the `secrets` context directly, so the
35+
caller must pass it explicitly (e.g. secrets.GITHUB_TOKEN).
36+
required: true
37+
38+
# ── Optional ────────────────────────────────────────────────────────────────
39+
40+
artifact-path:
41+
description: Directory the wheel artifacts are downloaded into.
42+
required: false
43+
default: 'dist'
44+
45+
files:
46+
description: Newline-separated glob(s) of files to publish. Passed through to publish-to-gitlab.
47+
required: false
48+
default: 'dist/*.whl'
49+
50+
skip-existing:
51+
description: Passed through to the publish-to-gitlab action.
52+
required: false
53+
default: 'false'
54+
55+
twine-version:
56+
description: Passed through to the publish-to-gitlab action.
57+
required: false
58+
default: ''
59+
60+
runs:
61+
using: 'composite'
62+
steps:
63+
64+
- name: Checkout python-wheels
65+
uses: actions/checkout@v4
66+
with:
67+
fetch-depth: 0
68+
69+
- name: Download wheels
70+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
71+
with:
72+
pattern: ${{ inputs.artifact-pattern }}
73+
path: ${{ inputs.artifact-path }}
74+
merge-multiple: true
75+
76+
- name: Publish to GitLab PyPI registry
77+
uses: riseproject-dev/python-wheels/actions/publish-to-gitlab@main
78+
with:
79+
gitlab-username: ${{ inputs.gitlab-username }}
80+
gitlab-token: ${{ inputs.gitlab-token }}
81+
gitlab-project-id: ${{ inputs.gitlab-project-id }}
82+
files: ${{ inputs.files }}
83+
skip-existing: ${{ inputs.skip-existing }}
84+
twine-version: ${{ inputs.twine-version }}
85+
86+
- name: Open docs update PR
87+
shell: bash
88+
env:
89+
GH_TOKEN: ${{ inputs.gh-token }}
90+
ARTIFACTS_PATH: ${{ inputs.artifact-path }}
91+
run: python3 ci_scripts/update_doc.py

0 commit comments

Comments
 (0)