File tree Expand file tree Collapse file tree 2 files changed +57
-14
lines changed
Expand file tree Collapse file tree 2 files changed +57
-14
lines changed Original file line number Diff line number Diff line change 11
2- name : Build Package And publish on PyPi
2+ name : Build Package And publish on Test PyPi
33
44on :
55 push :
@@ -30,31 +30,21 @@ jobs:
3030 name : python-package-distributions
3131 path : dist/
3232
33- release-on-pypi :
33+ release-on-test- pypi :
3434 runs-on : ubuntu-latest
3535 needs : build
36- environment :
37- name : testpypi
38- url : https://test.pypi.org/p/daxa
39- permissions :
40- id-token : write
4136 steps :
4237 - name : Download all the dists
4338 uses : actions/download-artifact@v4.1.1
4439 with :
4540 name : python-package-distributions
4641 path : dist/
4742
48- - name : Build and Upload to Test PyPI
43+ - name : Upload to Test PyPI
4944 run : |
5045 pip install twine
5146 twine upload --repository-url https://test.pypi.org/legacy/ dist/*
5247 env :
5348 TWINE_USERNAME : __token__
5449 TWINE_PASSWORD : ${{ secrets.PYPI_TEST_TOKEN }}
55-
56- # - name: Publish Daxa Distribution to TestPyPI
57- # uses: pypa/gh-action-pypi-publish@release/v1
58- # with:
59- # repository-url: https://test.pypi.org/legacy/
60- # packages-dir: pebblo/dist/
50+
Original file line number Diff line number Diff line change 1+ name : Pebblo release on PyPi
2+
3+ on :
4+ push :
5+ tags :
6+ - " v[0-9].[0-9]+.[0-9]+*"
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+ ssh-key : ${{ secrets.SSH_PRIVATE_KEY }}
17+ - name : Set up Python
18+ uses : actions/setup-python@v4
19+ with :
20+ python-version : " 3.11.x"
21+ - name : Install pypa/build
22+ run : |
23+ TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
24+ VERSION=$(echo $TAG | sed 's/v//')
25+ echo "Updating version to $VERSION"
26+ PROJECT_FILE_PATH=pyproject.toml
27+ awk -v new_version="$VERSION" '/^version = "/ {gsub(/"[^"]+"/, "\"" new_version "\"")} 1' "$PROJECT_FILE_PATH" > tmpfile && mv tmpfile "$PROJECT_FILE_PATH"
28+ pip install build
29+ python -m build --wheel
30+ - name : Store the distribution packages
31+ uses : actions/upload-artifact@v4.2.0
32+ with :
33+ name : pebblo-langchain-package-distributions
34+ path : dist/
35+
36+ release-on-pypi :
37+ runs-on : ubuntu-latest
38+ needs : build
39+ steps :
40+ - name : Download all the dists
41+ uses : actions/download-artifact@v4.1.1
42+ with :
43+ name : pebblo-langchain-package-distributions
44+ path : dist/
45+
46+ - name : Upload to PyPI
47+ run : |
48+ pip install twine
49+ twine upload dist/*
50+ env :
51+ TWINE_USERNAME : __token__
52+ TWINE_PASSWORD : ${{ secrets.PEBBLO_LANGCHAIN_PYPI_TOKEN }}
53+
You can’t perform that action at this time.
0 commit comments