File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Python Package
2+
3+ on :
4+ release :
5+ types :
6+ - published
7+
8+ jobs :
9+ build :
10+ name : Build distribution 📦
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+ with :
16+ persist-credentials : false
17+
18+ - name : Set up Python
19+ uses : actions/setup-python@v5
20+ with :
21+ python-version : ' 3.10'
22+
23+ - name : Install dependencies
24+ run : |
25+ python -m pip install --upgrade pip
26+ pip install hatch twine
27+
28+ - name : Build
29+ run : |
30+ hatch build
31+
32+ - name : Store the distribution packages
33+ uses : actions/upload-artifact@v4
34+ with :
35+ name : python-package-distributions
36+ path : dist/
37+
38+ deploy :
39+ name : Upload release to PyPI
40+ needs :
41+ - build
42+ runs-on : ubuntu-latest
43+
44+ # environment is used by PyPI Trusted Publisher and is strongly encouraged
45+ # https://docs.pypi.org/trusted-publishers/adding-a-publisher/
46+ environment :
47+ name : testpypi
48+ url : https://test.pypi.org/p/strands-agents
49+ permissions :
50+ # IMPORTANT: this permission is mandatory for Trusted Publishing
51+ id-token : write
52+
53+ steps :
54+ - name : Download all the dists
55+ uses : actions/download-artifact@v4
56+ with :
57+ name : python-package-distributions
58+ path : dist/
59+
60+ - name : Publish distribution 📦 to TestPyPI
61+ uses : pypa/gh-action-pypi-publish@release/v1
62+ with :
63+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments