forked from apache/cassandra-python-driver
-
Notifications
You must be signed in to change notification settings - Fork 56
68 lines (59 loc) · 1.87 KB
/
Copy pathpublish-manually.yml
File metadata and controls
68 lines (59 loc) · 1.87 KB
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
name: Build and upload to PyPi manually
permissions:
contents: read
on:
workflow_dispatch:
inputs:
upload:
description: 'Upload to PyPI'
type: boolean
required: false
default: false
python-version:
description: 'Python version to run on'
type: string
required: false
default: "3.13"
target:
description: "Target os to build for: linux,macos,windows"
type: string
required: false
default: "linux,macos-x86,macos-arm,windows,linux-aarch64"
target_tag:
description: "Publish particular tag"
type: string
required: false
default: ""
ignore_tests:
description: "Don't run tests"
type: boolean
required: false
default: false
jobs:
build-and-publish:
name: "Build wheels"
uses: ./.github/workflows/lib-build.yml
with:
python-version: ${{ inputs.python-version }}
ignore_tests: ${{ inputs.ignore_tests }}
target_tag: ${{ inputs.target_tag }}
target: ${{ inputs.target }}
# Publishing is a separate job (not inside the reusable workflow) because PyPI Trusted Publishing
# requires the *caller* workflow path in the OIDC token. A reusable workflow would embed its own
# path instead, causing an `invalid-publisher` error on the PyPI side.
# See: https://github.com/pypa/gh-action-pypi-publish/issues/166
publish:
name: "Publish wheels to PyPi"
needs: build-and-publish
if: inputs.upload
runs-on: ubuntu-24.04
permissions:
id-token: write
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
skip-existing: true