|
| 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 | + - uses: actions/setup-python@v5 |
| 87 | + with: |
| 88 | + python-version: '3' |
| 89 | + |
| 90 | + - name: Install ci_scripts/update_doc.py dependencies |
| 91 | + shell: bash |
| 92 | + run: pip install pyyaml |
| 93 | + |
| 94 | + - name: Open docs update PR |
| 95 | + shell: bash |
| 96 | + env: |
| 97 | + GH_TOKEN: ${{ inputs.gh-token }} |
| 98 | + ARTIFACTS_PATH: ${{ inputs.artifact-path }} |
| 99 | + run: python3 ci_scripts/update_doc.py |
0 commit comments