From d0a47c00333ca2ec6ac87d4e57c2a4ea0b0515af Mon Sep 17 00:00:00 2001 From: stabldev <114811070+stabldev@users.noreply.github.com> Date: Sat, 1 Nov 2025 09:50:14 +0530 Subject: [PATCH] ci: cd pipeline for pypi release --- .github/workflows/ci.yml | 4 +--- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 404ba6d..fe3244f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - name: Install uv and set the Python version uses: astral-sh/setup-uv@v6 @@ -31,7 +29,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Dependencies - run: uv sync --locked --all-extras --dev + run: uv sync --locked --all-extras - name: Run Pytest run: uv run pytest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f7a8f84 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release + +on: + push: + tags: + - "v*" + +jobs: + pypi: + name: Publish to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/project/fastapi-async-storages + permissions: + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Install uv and setup the python version + uses: astral-sh/setup-uv@v6 + with: + enable-cache: true + python-version-file: "pyproject.toml" + + - name: Install the project + run: uv sync + + - name: Build wheel + run: uv build + + - name: Publish package + run: uv publish