Skip to content

Commit 842c43e

Browse files
committed
chore: use uv to publish
1 parent 4c04d35 commit 842c43e

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
build:
1111
name: Build
1212
runs-on: ubuntu-24.04
13+
env:
14+
PYTHON_VERSION: 3.9
15+
UV_VERSION: 0.7.9
1316

1417
steps:
1518
- name: Checkout repository
@@ -18,12 +21,12 @@ jobs:
1821
- name: Install uv
1922
uses: astral-sh/setup-uv@v5
2023
with:
21-
version: "0.7.9"
24+
version: ${{ env.UV_VERSION }}
2225

2326
- name: "Set up Python"
2427
uses: actions/setup-python@v5
2528
with:
26-
python-version-file: "pyproject.toml"
29+
python-version: ${{ env.PYTHON_VERSION }}
2730

2831
- name: Install dependencies
2932
run: uv sync --locked --all-extras --dev

.github/workflows/publish.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: Publish
22

33
on:
44
release:
5-
types: [published]
5+
types: [ published ]
66

77
jobs:
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
@@ -20,6 +20,11 @@ jobs:
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}
@@ -64,7 +61,7 @@ jobs:
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
@@ -85,7 +82,7 @@ jobs:
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

Comments
 (0)