@@ -2,16 +2,16 @@ name: Publish
22
33on :
44 release :
5- types : [published]
5+ types : [ published ]
66
77jobs :
88 deploy :
99 name : Deploy to package index
1010 runs-on : ubuntu-24.04
1111 env :
1212 PYTHON_VERSION : 3.9
13- REPOSITORY_USERNAME : ${{ secrets.PYPI_USERNAME }}
14- REPOSITORY_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
13+ UV_VERSION : 0.7.9
14+ UV_PUBLISH_TOKEN : ${{ secrets.PYPI_PASSWORD }}
1515 REPOSITORY_URL : ${{ secrets.PYPI_PUBLISH_URL }}
1616 ANACONDA_TOKEN : ${{ secrets.ANACONDA_TOKEN }}
1717 CONDA_ENV_NAME : conda-env
2020 - name : Checkout repository
2121 uses : actions/checkout@v4
2222
23+ - name : Install uv
24+ uses : astral-sh/setup-uv@v5
25+ with :
26+ version : ${{ env.UV_VERSION }}
27+
2328 - name : Setup Python
2429 uses : actions/setup-python@v5
2530 with :
@@ -32,21 +37,13 @@ jobs:
3237 activate-environment : ${{ env.CONDA_ENV_NAME }}
3338 python-version : ${{ env.PYTHON_VERSION }}
3439
35- - name : Install Poetry
36- uses : snok/install-poetry@v1
37-
38- - name : Configure Poetry
39- run : |
40- poetry config repositories.publish $REPOSITORY_URL
41- poetry config http-basic.publish $REPOSITORY_USERNAME $REPOSITORY_PASSWORD
42-
4340 - name : Build
4441 run : |
45- poetry build
42+ uv build
4643
4744 - name : Publish
4845 run : |
49- poetry publish -r publish
46+ uv publish
5047
5148 - name : Publish to Anaconda
5249 shell : bash -el {0}
6461 while [ $count -lt $max_retries ]; do
6562 # Create meta.yaml recipe for the package pulled from PyPi
6663 grayskull pypi fds.sdk.utils==${version}
67-
64+
6865 if [ -f ./fds.sdk.utils/meta.yaml ]; then
6966 echo "Version ${version} of fds.sdk.utils is available on PyPI."
7067
8582 conda config --set anaconda_upload no
8683 package_file=$(conda build fds.sdk.utils --output)
8784 conda build -c conda-forge fds.sdk.utils
88-
85+
8986 anaconda -t $ANACONDA_TOKEN upload -u factset -l main ${package_file}
9087 break
9188 else
0 commit comments