Skip to content

[WIP] Use Poetry as the dependency manager of this library #3257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
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
56 changes: 28 additions & 28 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name: Publish tag to Pypi
name: 🏷️ Publish release to PyPI

on:
release:
types: [published]

permissions:
contents: read # to fetch code (actions/checkout)
types:
- created

jobs:

build_and_package:
build-and-publish:
name: 🔨 Build and publish package
runs-on: ubuntu-latest
permissions:
# To fetch the code (actions/checkout)
contents: read
strategy:
matrix:
python-version: ['3.9.19']
poetry-version: ['1.8.3']
steps:
- uses: actions/checkout@v4
- name: install python
- name: 📂 Checkout repository
uses: actions/checkout@v4
- name: 🐍 Setup Python (${{ matrix.python-version }})
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dev tools
run: |
pip install -r dev_requirements.txt
pip install twine wheel

- name: Build package
python-version: ${{ matrix.python-version }}
- name: 📦 Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ matrix.poetry-version }}
virtualenvs-create: false
installer-parallel: true
- name: 📦 Install dependencies and configure credentials
run: |
python setup.py build
python setup.py sdist bdist_wheel

- name: Basic package test prior to upload
run: |
twine check dist/*

- name: Publish to Pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
poetry run pip install --no-deps --upgrade pip
poetry install --with dev --no-interaction --no-ansi
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
- name: 🚀 Build and publish package
run: poetry publish --build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dump.rdb
_build
vagrant/.vagrant
.python-version
.tool-versions
.cache
.eggs
.idea
Expand Down
18 changes: 0 additions & 18 deletions dev_requirements.txt

This file was deleted.

Loading