-
Notifications
You must be signed in to change notification settings - Fork 17
99 lines (91 loc) · 2.67 KB
/
wheels-publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Publish RAPIDS wheels
on:
workflow_call:
inputs:
# repo and branch
repo:
type: string
branch:
type: string
date:
type: string
sha:
type: string
build_type:
required: true
type: string
# general settings
package-name:
required: true
type: string
package-type:
required: false
default: python
type: string
publish_to_pypi:
required: false
type: boolean
default: false
permissions:
actions: read
checks: none
contents: read
deployments: none
discussions: none
id-token: write
issues: none
packages: read
pages: none
pull-requests: read
repository-projects: none
security-events: none
statuses: none
jobs:
wheel-publish:
name: wheels publish
runs-on: linux-amd64-cpu4
container:
# CUDA toolkit version of the container is irrelevant in the publish step.
# This just uploads already-built wheels to remote storage.
image: "rapidsai/ci-wheel:latest"
env:
RAPIDS_BUILD_TYPE: ${{ inputs.build_type }}
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
role-duration-seconds: 43200 # 12h
- name: checkout code repo
uses: actions/checkout@v4
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.sha }}
fetch-depth: 0 # unshallow fetch for setuptools-scm
persist-credentials: false
- name: Standardize repository information
uses: rapidsai/shared-actions/rapids-github-info@main
with:
repo: ${{ inputs.repo }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
- name: Download wheels from downloads.rapids.ai and publish to anaconda repository
run: rapids-wheels-anaconda "${{ inputs.package-name }}" "${{ inputs.package-type }}"
env:
RAPIDS_CONDA_TOKEN: ${{ secrets.CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN }}
- name: Check if build is release
id: check_if_release
shell: bash
if: ${{ inputs.publish_to_pypi }}
run: |
if rapids-is-release-build; then
echo "is_release_build=true" | tee -a ${GITHUB_OUTPUT}
else
echo "is_release_build=false" | tee -a ${GITHUB_OUTPUT}
fi
- name: Publish the downloaded wheels to PyPI
if: ${{ inputs.publish_to_pypi && steps.check_if_release.outputs.is_release_build == 'true' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.RAPIDSAI_PYPI_TOKEN }}