From 2b818a490006e513df79be8701fe93973a2e4849 Mon Sep 17 00:00:00 2001 From: juaristi22 Date: Thu, 24 Jul 2025 13:06:18 +0200 Subject: [PATCH] switch publishing to after versioning --- .github/workflows/master.yml | 32 ------------------------------ .github/workflows/versioning.yaml | 33 ++++++++++++++++++++++++++++++- changelog_entry.yaml | 4 ++++ 3 files changed, 36 insertions(+), 33 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 8b49f6ab..51957625 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -64,35 +64,3 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages # The branch the action should deploy to. FOLDER: docs/_build/html # The folder the action should deploy. - - publish-to-pypi: - name: Publish to PyPI - needs: test - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Fetch all history for all tags and branches - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.13' - - name: Install uv - uses: astral-sh/setup-uv@v3 - with: - version: "latest" - - name: Install dependencies - run: | - uv pip install -e ".[dev]" --system - - name: Build package - run: | - make build - - name: Publish a git tag - run: ".github/publish-git-tag.sh || true" - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI }} - skip-existing: true diff --git a/.github/workflows/versioning.yaml b/.github/workflows/versioning.yaml index 5d7e7ceb..88437c33 100644 --- a/.github/workflows/versioning.yaml +++ b/.github/workflows/versioning.yaml @@ -34,4 +34,35 @@ jobs: uses: EndBug/add-and-commit@v9 with: add: "." - message: Update package version \ No newline at end of file + message: Update package version + publish-to-pypi: + name: Publish to PyPI + needs: test + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for all tags and branches + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + version: "latest" + - name: Install dependencies + run: | + uv pip install -e ".[dev]" --system + - name: Build package + run: | + make build + - name: Publish a git tag + run: ".github/publish-git-tag.sh || true" + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI }} + skip-existing: true diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29b..37a5b588 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + changed: + - Move publishing to pypi to after versioning job.