add Poetry
This commit is contained in:
20
.github/workflows/publish.yml
vendored
20
.github/workflows/publish.yml
vendored
@ -21,13 +21,12 @@ jobs:
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Setup Poetry
|
||||
uses: abatilo/actions-poetry@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
pip install -r requirements-dev.txt
|
||||
pip install setuptools wheel
|
||||
run: poetry install
|
||||
- name: Build wheel file
|
||||
run: python setup.py bdist_wheel
|
||||
run: poetry build
|
||||
- id: skip_check
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@ -38,16 +37,17 @@ jobs:
|
||||
needs: build
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
runs-on: ubuntu-latest
|
||||
# Specifying a GitHub environment is optional, but strongly encouraged
|
||||
environment: release
|
||||
permissions:
|
||||
# IMPORTANT: this permission is mandatory for trusted publishing
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Create dist folder
|
||||
run: |
|
||||
mkdir -p dist
|
||||
run: mkdir -p dist
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: whl
|
||||
path: dist
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
|
Reference in New Issue
Block a user