From 7c3c49d316360b2d5d9510c6eba31ded6d3f42b3 Mon Sep 17 00:00:00 2001 From: CoderDeltaLan Date: Tue, 16 Sep 2025 10:34:53 +0100 Subject: [PATCH] =?UTF-8?q?ci(release):=20workflow=20m=C3=ADnimo=20estable?= =?UTF-8?q?=20(GHCR=20ok,=20PyPI=20opcional)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e250a92..3b47ec7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,32 +1,33 @@ name: release on: push: - tags: ['v*'] + tags: + - 'v*' permissions: - contents: read + contents: write packages: write -concurrency: - group: release-${{ github.ref }} - cancel-in-progress: true - jobs: ghcr: - name: Publish GHCR runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Compute image name (lowercase) + + # Nombre de imagen SIEMPRE en minĂºsculas + - name: Set image name shell: bash - run: echo "IMAGE=ghcr.io/${GITHUB_REPOSITORY@L}" >> "$GITHUB_ENV" + run: echo "IMAGE=ghcr.io/${GITHUB_REPOSITORY,,}" >> "$GITHUB_ENV" + - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 with: context: . @@ -36,20 +37,16 @@ jobs: tags: ${{ env.IMAGE }}:latest,${{ env.IMAGE }}:${{ github.ref_name }} pypi: - name: Publish PyPI (guarded) - if: ${{ secrets.PYPI_API_TOKEN != '' }} needs: ghcr + if: ${{ secrets.PYPI_API_TOKEN != '' }} runs-on: ubuntu-latest - permissions: - contents: read steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - with: { python-version: '3.12' } - - name: Build sdist/wheel - run: | - python -m pip install -U pip build - python -m build + with: + python-version: '3.12' + - run: python -m pip install -U pip build + - run: python -m build - uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__