FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
splunk-sdk-python/.github/workflows/cd.yml at develop · splunk/splunk-sdk-python · GitHub
splunk
splunk-sdk-python
Repository navigation
Code
Issues
10
(10)
Pull requests
18
(18)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
splunk-sdk-python
/
.github
/
workflows
/
cd.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
109 lines (104 loc) · 3.82 KB
Breadcrumbs
splunk-sdk-python
/
.github
/
workflows
/
cd.yml
Copy path
File metadata and controls
109 lines (104 loc) · 3.82 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
100
101
102
103
104
105
106
107
108
109
name
:
Python SDK CD
on
:
push
:
branches
:
[develop]
release
:
types
:
[published]
workflow_dispatch
:
concurrency
:
group
:
${{ github.workflow }}-${{ github.ref }}
cancel-in-progress
:
false
permissions
:
{}
jobs
:
build-distributables
:
name
:
Build release distributables
#
Why building is separate from publishing:
#
https://github.com/pypa/gh-action-pypi-publish/issues/217#issuecomment-1965727093
runs-on
:
ubuntu-latest
outputs
:
version
:
${{ steps.get-version.outputs.version }}
steps
:
-
uses
:
actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with
:
persist-credentials
:
false
-
uses
:
./.github/actions/setup-sdk-environment
with
:
deps-group
:
release
-
name
:
Set pre-release version
if
:
startsWith(github.ref, 'refs/tags/') == false
env
:
RUN_NUMBER
:
${{ github.run_number }}
run
:
|
VERSION_BASE="$(uv version --short)"
uv version "${VERSION_BASE}.dev${RUN_NUMBER}"
-
name
:
Set release version
if
:
startsWith(github.ref, 'refs/tags/') == true
env
:
VERSION_TAG
:
${{ github.event.release.tag_name }}
run
:
|
[[ ${VERSION_TAG} != $(uv version --short) ]] && {
printf "To prevent pre-releases being versioned incorrectly, \
target package version needs to be set in pyproject.toml first.\n"
exit 1
}
uv version "${VERSION_TAG}"
-
name
:
Get current version
id
:
get-version
run
:
echo "version=$(uv version --short)" >> "$GITHUB_OUTPUT"
-
name
:
Build packages for distribution
run
:
uv build
-
name
:
Run AppInspect
if
:
startsWith(github.ref, 'refs/tags/') == true
uses
:
./.github/actions/run-appinspect
-
name
:
Upload distributables
uses
:
actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with
:
name
:
splunk-sdk-${{ steps.get-version.outputs.version }}
path
:
dist/
-
name
:
Generate API reference
run
:
make docs-zip
-
name
:
Upload docs artifact
uses
:
actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with
:
name
:
python-sdk-docs
path
:
docs/_build/splunk-sdk-python-docs.zip
publish-pre-release
:
name
:
Publish pre-release to Test PyPI
if
:
startsWith(github.ref, 'refs/tags/') == false
needs
:
build-distributables
runs-on
:
ubuntu-latest
permissions
:
id-token
:
write
#
Required for OIDC-based trusted publishing to PyPI
environment
:
name
:
splunk-test-pypi
url
:
https://test.pypi.org/project/splunk-sdk/
steps
:
-
name
:
Download distributables
uses
:
actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with
:
name
:
splunk-sdk-${{ needs.build-distributables.outputs.version }}
path
:
dist/
-
name
:
Publish packages to Test PyPI
uses
:
pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247
with
:
repository-url
:
https://test.pypi.org/legacy/
publish-release
:
name
:
Publish release to PyPI
if
:
startsWith(github.ref, 'refs/tags/') == true
needs
:
build-distributables
runs-on
:
ubuntu-latest
permissions
:
id-token
:
write
#
Required for OIDC-based trusted publishing to PyPI
environment
:
name
:
splunk-pypi
url
:
https://pypi.org/project/splunk-sdk/
steps
:
-
name
:
Download distributables
uses
:
actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with
:
name
:
splunk-sdk-${{ needs.build-distributables.outputs.version }}
path
:
dist/
-
name
:
Publish packages to PyPI
uses
:
pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247
with
:
repository-url
:
https://upload.pypi.org/legacy/
Back
|
FazBrowse Home
|
New Git URL