From 1b35ac44a24947be7d1db5accf984bf43da2c47c Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sun, 20 Jul 2025 20:05:41 +0000 Subject: [PATCH] Fix Windows glob pattern in publish workflow --- .github/workflows/publish.yml | 210 +++++++++++++++++----------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 074d12c..1689ba4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,106 +1,106 @@ -name: Publish to PyPI - -on: - release: - types: [published] - workflow_dispatch: - inputs: - test_pypi: - description: 'Publish to TestPyPI instead of PyPI' - required: false - type: boolean - default: true - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install build dependencies - run: | - python -m pip install --upgrade pip - pip install build twine - - - name: Build package - run: python -m build - - - name: Check package - run: twine check dist/* - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: dist - path: dist/ - - test-install: - needs: build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.8", "3.12"] - - steps: - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: dist - path: dist/ - - - name: Test installation - shell: bash - run: | - pip install dist/*.whl - python -c "import sqrtspace_spacetime; print(sqrtspace_spacetime.__version__)" - - publish-testpypi: - if: github.event_name == 'workflow_dispatch' && github.event.inputs.test_pypi == 'true' - needs: test-install - runs-on: ubuntu-latest - environment: testpypi - permissions: - id-token: write - - steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: dist - path: dist/ - - - name: Publish to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ - skip-existing: true - - publish-pypi: - if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.test_pypi == 'false') - needs: test-install - runs-on: ubuntu-latest - environment: pypi - permissions: - id-token: write - - steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: dist - path: dist/ - - - name: Publish to PyPI +name: Publish to PyPI + +on: + release: + types: [published] + workflow_dispatch: + inputs: + test_pypi: + description: 'Publish to TestPyPI instead of PyPI' + required: false + type: boolean + default: true + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: python -m build + + - name: Check package + run: twine check dist/* + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + test-install: + needs: build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ["3.8", "3.12"] + + steps: + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Test installation + shell: bash + run: | + pip install dist/*.whl + python -c "import sqrtspace_spacetime; print(sqrtspace_spacetime.__version__)" + + publish-testpypi: + if: github.event_name == 'workflow_dispatch' && github.event.inputs.test_pypi == 'true' + needs: test-install + runs-on: ubuntu-latest + environment: testpypi + permissions: + id-token: write + + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Publish to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + skip-existing: true + + publish-pypi: + if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.test_pypi == 'false') + needs: test-install + runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write + + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file