Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 34 additions & 14 deletions .github/workflows/publish-pypi-bdist-linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish pip bdist to PyPI - linux
name: uv publish bdist to PyPI

on:
release:
Expand All @@ -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
45 changes: 23 additions & 22 deletions .github/workflows/publish-pypi-sdist.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish pip sdist to PyPI
name: uv publish sdist to PyPI

on:
release:
Expand All @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/test-complete-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ on:
jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
Expand All @@ -25,6 +23,8 @@ jobs:
- python-version: ['3.11']
os: windows-latest

runs-on: ${{ matrix.os }}

steps:

# Install latex
Expand Down
Loading