Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions .github/workflows/build-numpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
paths:
- '.github/workflows/build-numpy.yml'
- 'actions/publish-to-gitlab/**'
- 'actions/publish-wheels/**'
- 'ci_scripts/update_doc.py'

concurrency:
group: ${{ github.workflow }}-${{ inputs.version || '2.5.1' }}-${{ github.head_ref || github.run_id }}
Expand Down Expand Up @@ -103,21 +105,15 @@ jobs:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
pull-requests: write

steps:
- name: Download wheels
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: numpy-${{ env.NUMPY_VERSION }}-*-manylinux_riscv64
path: dist
merge-multiple: true

- name: Publish to GitLab PyPI registry
uses: riseproject-dev/python-wheels/actions/publish-to-gitlab@main
- name: Publish wheels and open docs PR
uses: riseproject-dev/python-wheels/actions/publish-wheels@main
with:
artifact-pattern: numpy-${{ env.NUMPY_VERSION }}-*-manylinux_riscv64
gitlab-username: ${{ vars.GITLAB_DEPLOY_USER }}
gitlab-token: ${{ secrets.GITLAB_DEPLOY_TOKEN }}
gitlab-project-id: ${{ vars.GITLAB_PROJECT_ID }}
files: |
dist/*.whl
gh-token: ${{ secrets.GITHUB_TOKEN }}
Binary file added actions/publish-wheels/.action.yml.swp
Binary file not shown.
91 changes: 91 additions & 0 deletions actions/publish-wheels/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: 'Publish riscv64 Wheels and Document Release'
description: >
Checks out python-wheels, downloads a package's built wheel artifacts,
publishes them to the GitLab PyPI Package Registry, and opens a pull
request documenting the new version in docs/packages/. Wraps the publish
job body shared by every build-<package>.yml workflow so it doesn't need
to be duplicated per package.
inputs:

# ── Required ────────────────────────────────────────────────────────────────

artifact-pattern:
description: >
Pattern passed to actions/download-artifact to select this package's
wheel artifacts, e.g. "numpy-2.5.1-*-manylinux_riscv64".
required: true

gitlab-username:
description: Passed through to the publish-to-gitlab action.
required: true

gitlab-token:
description: Passed through to the publish-to-gitlab action.
required: true

gitlab-project-id:
description: Passed through to the publish-to-gitlab action.
required: true

gh-token:
description: >
GitHub token used to push the docs branch and open the docs PR.
Composite actions cannot read the `secrets` context directly, so the
caller must pass it explicitly (e.g. secrets.GITHUB_TOKEN).
required: true

# ── Optional ────────────────────────────────────────────────────────────────

artifact-path:
description: Directory the wheel artifacts are downloaded into.
required: false
default: 'dist'

files:
description: Newline-separated glob(s) of files to publish. Passed through to publish-to-gitlab.
required: false
default: 'dist/*.whl'

skip-existing:
description: Passed through to the publish-to-gitlab action.
required: false
default: 'false'

twine-version:
description: Passed through to the publish-to-gitlab action.
required: false
default: ''

runs:
using: 'composite'
steps:

- name: Checkout python-wheels
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download wheels
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: ${{ inputs.artifact-pattern }}
path: ${{ inputs.artifact-path }}
merge-multiple: true

- name: Publish to GitLab PyPI registry
uses: riseproject-dev/python-wheels/actions/publish-to-gitlab@main
with:
gitlab-username: ${{ inputs.gitlab-username }}
gitlab-token: ${{ inputs.gitlab-token }}
gitlab-project-id: ${{ inputs.gitlab-project-id }}
files: ${{ inputs.files }}
skip-existing: ${{ inputs.skip-existing }}
twine-version: ${{ inputs.twine-version }}

- name: Open docs update PR
shell: bash
env:
GH_TOKEN: ${{ inputs.gh-token }}
ARTIFACTS_PATH: ${{ inputs.artifact-path }}
run: python3 ci_scripts/update_doc.py
Loading
Loading