1111 outputs :
1212 version : ${{ steps.extract_tag.outputs.tag }}
1313 steps :
14- - uses : actions/checkout@v2
14+ - uses : actions/checkout@v4
1515 - id : extract_tag
1616 name : Extract tag name
1717 run : echo "::set-output name=tag::$(echo $GITHUB_REF | cut -d / -f 3)"
2424 permissions :
2525 id-token : write # IMPORTANT: mandatory for trusted publishing
2626 steps :
27- - uses : actions/checkout@master
27+ - uses : actions/checkout@v4
2828 - name : Set up Python 3.9
2929 uses : actions/setup-python@v3
3030 with :
5454 uses : pypa/gh-action-pypi-publish@release/v1 # This requires a trusted publisher to be setup in pypi/testpypi
5555 with :
5656 repository-url : https://test.pypi.org/legacy/
57- verbose : true
5857
5958 build-and-publish-pypi :
6059 needs : [extract-tag, build-and-publish-test-pypi]
@@ -64,34 +63,36 @@ jobs:
6463 permissions :
6564 id-token : write # IMPORTANT: mandatory for trusted publishing
6665 steps :
67- - uses : actions/checkout@master
66+ - uses : actions/checkout@v4
6867 - name : Set up Python 3.9
6968 uses : actions/setup-python@v3
7069 with :
7170 python-version : " 3.9"
7271 - name : Install dependencies
7372 run : python3 -m pip install setuptools wheel twine
74- - name : Update version in setup.py
73+ - name : Update version in setup.py (dspy)
7574 run : sed -i '/#replace_package_version_marker/{n;s/version="[^"]*"/version="${{ needs.extract-tag.outputs.version }}"/;}' setup.py
7675 - name : Update version in pyproject.toml
7776 run : sed -i '/#replace_package_version_marker/{n;s/version="[^"]*"/version="${{ needs.extract-tag.outputs.version }}"/;}' pyproject.toml
78- # Publish to dspy-ai
79- - name : Update package name in setup.py
80- run : sed -i '/#replace_package_name_marker/{n;s/name="[^"]*"/name="dspy-ai"/;}' setup.py
81- - name : Update package name in pyproject.toml
82- run : sed -i '/#replace_package_name_marker/{n;s/name="[^"]*"/name="dspy-ai"/;}' pyproject.toml
83- - name : Build a binary wheel
84- run : python3 setup.py sdist bdist_wheel
85- - name : Publish distribution 📦 to PyPI (dspy-ai)
86- uses : pypa/gh-action-pypi-publish@release/v1 # This requires a trusted publisher to be setup in pypi
8777 # Publish to dspy
8878 - name : Update package name in setup.py
89- run : sed -i '/#replace_package_name_marker/{n;s/name="[^"]*"/name="dspy"/;}' setup.py
79+ run : |
80+ sed -i '/#replace_package_name_marker/{n;s/name="[^"]*"/name="dspy"/;}' setup.py
9081 - name : Update package name in pyproject.toml
9182 run : sed -i '/#replace_package_name_marker/{n;s/name="[^"]*"/name="dspy"/;}' pyproject.toml
9283 - name : Build a binary wheel
9384 run : python3 setup.py sdist bdist_wheel
9485 - name : Publish distribution 📦 to PyPI (dspy)
9586 uses : pypa/gh-action-pypi-publish@release/v1 # This requires a trusted publisher to be setup in pypi
96-
97-
87+ # Publish to dspy-ai
88+ - name : Update version in setup.py (dspy-ai)
89+ run : sed -i '/#replace_package_version_marker/{n;s/version="[^"]*"/version="${{ needs.extract-tag.outputs.version }}"/;}' ./dspy/.internal_dspyai/setup.py
90+ - name : Update package name in setup.py
91+ run : sed -i '/#replace_package_name_marker/{n;s/name="[^"]*"/name="dspy-ai"/;}' ./dspy/.internal_dspyai/setup.py
92+ - name : Update dspy dependency version in setup.py
93+ run : |
94+ sed -i '/#replace_dspy_version_marker/{n;s/dspy==[^"]*/dspy==${{ needs.extract-tag.outputs.version }}/;}' ./dspy/.internal_dspyai/setup.py
95+ - name : Build a binary wheel
96+ run : python3 ./dspy/.internal_dspyai/setup.py sdist bdist_wheel
97+ - name : Publish distribution 📦 to PyPI (dspy-ai)
98+ uses : pypa/gh-action-pypi-publish@release/v1 # This requires a trusted publisher to be setup in pypi
0 commit comments