From 20e04e4c072010faf0cda7ffdddaf9ea392e22dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20Crespo?= Date: Wed, 25 Sep 2024 17:59:53 +0000 Subject: [PATCH] Update release workflow --- .../workflows/{publish.yml => release.yml} | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) rename .github/workflows/{publish.yml => release.yml} (66%) diff --git a/.github/workflows/publish.yml b/.github/workflows/release.yml similarity index 66% rename from .github/workflows/publish.yml rename to .github/workflows/release.yml index a5a395d3..47f88521 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Publish +name: Release on: push: @@ -6,25 +6,33 @@ on: - "v*" workflow_dispatch: +permissions: + contents: read + id-token: write + packages: write + jobs: - publish: + pypi: runs-on: ubuntu-latest environment: release - permissions: - contents: read - id-token: write - packages: write steps: - name: "Check out source code" uses: "actions/checkout@v4" - - name: "Install Python" - uses: "actions/setup-python@v5" - - name: "Install dependencies" - run: pip install setuptools wheel build - - name: "Build" - run: python -m build - - name: "Publish" + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: true + version: latest + - name: Build package + run: uv build + - name: "Upload distribution packages to PyPI" uses: pypa/gh-action-pypi-publish@release/v1 + docker: + runs-on: ubuntu-latest + environment: release + steps: + - name: "Check out source code" + uses: "actions/checkout@v4" - name: Capture Docker metadata id: meta uses: docker/metadata-action@v5