Skip to content

Commit

Permalink
build(release): switch from poetry to pdm for package management
Browse files Browse the repository at this point in the history
  • Loading branch information
NekoAria committed Aug 18, 2024
1 parent 3c39041 commit 6e1cecd
Show file tree
Hide file tree
Showing 5 changed files with 309 additions and 449 deletions.
33 changes: 10 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,18 @@ on:
workflow_dispatch:

jobs:
deploy:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
steps:
- uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pip install poetry
- name: Install dependencies
run: poetry install
- name: Build wheel
run: poetry build --format wheel
- name: Checkout code
uses: actions/checkout@v4

# Conditionally build sdist
- name: Build sdist
if: matrix.python-version == '3.9'
run: poetry build --format sdist
- name: Setup PDM
uses: pdm-project/setup-pdm@v4

- name: Publish package
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: pdm publish --username $PYPI_USERNAME --password $PYPI_PASSWORD
35 changes: 0 additions & 35 deletions .github/workflows/testpypi.yml

This file was deleted.

2 changes: 2 additions & 0 deletions PicImageSearch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
from .saucenao import SauceNAO
from .tracemoe import TraceMoe
from .yandex import Yandex

__version__ = "3.10.8"
Loading

0 comments on commit 6e1cecd

Please sign in to comment.