FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
simstudioai-sim/.github/workflows/publish-python-sdk.yml at main · riverwolf67/simstudioai-sim · GitHub
riverwolf67
/
simstudioai-sim
Public
forked from
simstudioai/sim
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
simstudioai-sim
/
.github
/
workflows
/
publish-python-sdk.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
92 lines (76 loc) · 3.01 KB
Breadcrumbs
simstudioai-sim
/
.github
/
workflows
/
publish-python-sdk.yml
Copy path
File metadata and controls
92 lines (76 loc) · 3.01 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
name
:
Publish Python SDK
on
:
push
:
branches
:
[main]
paths
:
-
'
packages/python-sdk/**
'
permissions
:
contents
:
write
jobs
:
publish-pypi
:
runs-on
:
blacksmith-4vcpu-ubuntu-2404
steps
:
-
name
:
Checkout repository
uses
:
actions/checkout@v4
-
name
:
Setup Python
uses
:
actions/setup-python@v5
with
:
python-version
:
'
3.12
'
cache
:
'
pip
'
-
name
:
Install build dependencies
run
:
|
python -m pip install --upgrade pip
pip install build twine pytest requests tomli
-
name
:
Run tests
working-directory
:
packages/python-sdk
run
:
|
PYTHONPATH=. pytest tests/ -v
-
name
:
Get package version
id
:
package_version
working-directory
:
packages/python-sdk
run
:
echo "version=$(python -c "import tomli; print(tomli.load(open('pyproject.toml', 'rb'))['project']['version'])")" >> $GITHUB_OUTPUT
-
name
:
Check if version already exists
id
:
version_check
run
:
|
if pip index versions simstudio-sdk | grep -q "${{ steps.package_version.outputs.version }}"; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
-
name
:
Build package
if
:
steps.version_check.outputs.exists == 'false'
working-directory
:
packages/python-sdk
run
:
python -m build
-
name
:
Check package
if
:
steps.version_check.outputs.exists == 'false'
working-directory
:
packages/python-sdk
run
:
twine check dist/*
-
name
:
Publish to PyPI
if
:
steps.version_check.outputs.exists == 'false'
working-directory
:
packages/python-sdk
env
:
TWINE_USERNAME
:
__token__
TWINE_PASSWORD
:
${{ secrets.PYPI_API_TOKEN }}
run
:
twine upload dist/*
-
name
:
Log skipped publish
if
:
steps.version_check.outputs.exists == 'true'
run
:
echo "Skipped publishing because version ${{ steps.package_version.outputs.version }} already exists on PyPI"
-
name
:
Create GitHub Release
if
:
steps.version_check.outputs.exists == 'false'
uses
:
softprops/action-gh-release@v1
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
with
:
tag_name
:
python-sdk-v${{ steps.package_version.outputs.version }}
name
:
Python SDK v${{ steps.package_version.outputs.version }}
body
:
|
## Python SDK v${{ steps.package_version.outputs.version }}
Published simstudio-sdk==${{ steps.package_version.outputs.version }} to PyPI.
### Installation
```bash
pip install simstudio-sdk==${{ steps.package_version.outputs.version }}
```
### Documentation
See the [README](https://github.com/simstudioai/sim/tree/main/packages/python-sdk) or the [docs](https://docs.sim.ai/sdks/python) for more information.
draft
:
false
prerelease
:
false
Back
|
FazBrowse Home
|
New Git URL