From 000112a84b0eacddf6618edeab8bba09f5114733 Mon Sep 17 00:00:00 2001 From: Sadra Yahyapour Date: Wed, 20 Nov 2024 06:30:40 +0330 Subject: [PATCH] using uv --- .github/workflows/release.yml | 36 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59aa1b8..742323a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,33 +1,25 @@ -name: Package Releasing +name: Release Package on: - push: - tags: - - v* - workflow_dispatch: + release: + types: ["published"] jobs: - pypi-publish: - name: upload release to PyPI + release: + name: Build and publish a new release runs-on: ubuntu-latest - environment: release - permissions: - id-token: write + steps: - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" + - name: Install uv + uses: astral-sh/setup-uv@v3 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build + - name: Set up Python + run: uv python install 3.13 - - name: Build package - run: python -m build + - name: Build + run: uv build - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Publish + run: uv publish -t ${{ secrets.PYPI_TOKEN }}