diff --git a/.github/workflows/publish-pypi-bdist-linux.yml b/.github/workflows/publish-pypi-bdist-linux.yml index a9a8d9490..185d7e5ce 100644 --- a/.github/workflows/publish-pypi-bdist-linux.yml +++ b/.github/workflows/publish-pypi-bdist-linux.yml @@ -1,4 +1,4 @@ -name: Publish pip bdist to PyPI - linux +name: uv publish bdist to PyPI on: release: @@ -11,24 +11,44 @@ on: jobs: pypi: - name: Publish sdist to Pypi - runs-on: ubuntu-latest + name: Publish bdist to Pypi strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] - python-version: ['3.8', '3.9', '3.10', '3.11'] - exclude: - - python-version: ['3.11'] - os: windows-latest + os: [ubuntu-latest] # windows-latest, macOS-latest] + python-version: ['3.9', '3.10', '3.11'] + #exclude: + #- python-version: ['3.11'] + #os: windows-latest + runs-on: ${{ matrix.os }} steps: - - name: Set up Python ${{ matrix.python-version }} - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v5 + + # git checkout + - name: git checkout + uses: actions/checkout@v5 with: - python-version: ${{ matrix.python-version }} - - run: uv build - - run: uv publish -t ${{ secrets.PYPI_API_TOKEN }} + # https://github.com/marketplace/actions/checkout#usage + fetch-depth: 0 # to fetch all history from all branches + fetch-tags: true + + # Install uv + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + python-version: ${{ matrix.python-version }} + + # Build dist + - name: Build the project + run: | + rm dist/* + uv build + rm dist/*.tar.gz + + - name: Publish bdist to PyPI + env: + UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + run: | + uv publish diff --git a/.github/workflows/publish-pypi-sdist.yml b/.github/workflows/publish-pypi-sdist.yml index e55f692f9..923011751 100644 --- a/.github/workflows/publish-pypi-sdist.yml +++ b/.github/workflows/publish-pypi-sdist.yml @@ -1,4 +1,4 @@ -name: Publish pip sdist to PyPI +name: uv publish sdist to PyPI on: release: @@ -15,28 +15,29 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 + + # git checkout + - name: git checkout + uses: actions/checkout@v5 with: - python-version: '3.9' - - name: Display python version - run: | - python -c "import sys; print(sys.version)" - - name: Install dependencies - run: | - pip install --upgrade pip - pip install setuptools wheel twine - pip install -r requirements.txt - - name: check ref and event - run: | - echo ${{github.ref}} - - name: Build sdist + # https://github.com/marketplace/actions/checkout#usage + fetch-depth: 0 # to fetch all history from all branches + fetch-tags: true + + # Install uv + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + python-version: 3.11 + + # Build dist + - name: Build the project run: | - python setup.py sdist - - name: Publish source to PyPI + uv build + rm dist/*whl + + - name: Publish sdist to PyPI env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }} run: | - twine upload dist/*.tar.gz + uv publish diff --git a/.github/workflows/test-complete-matrix.yml b/.github/workflows/test-complete-matrix.yml index e8fcb2941..c8f0b1f6a 100644 --- a/.github/workflows/test-complete-matrix.yml +++ b/.github/workflows/test-complete-matrix.yml @@ -13,8 +13,6 @@ on: jobs: build: - runs-on: ${{ matrix.os }} - strategy: matrix: os: [ubuntu-latest] @@ -25,6 +23,8 @@ jobs: - python-version: ['3.11'] os: windows-latest + runs-on: ${{ matrix.os }} + steps: # Install latex