mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 03:54:21 +01:00
Add PyPi pipeline (#482)
* add pypi pipeline * build and publish * prepare inputs * matrix strategy * matrix * install only whl * try upload should error * try token * retry token * use token directly * no poetry config * try again * upload on release * bump
This commit is contained in:
35
.github/workflows/pypi.yaml
vendored
Normal file
35
.github/workflows/pypi.yaml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Pip package
|
||||
|
||||
on:
|
||||
push:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.10"]
|
||||
poetry-version: ["1.7.1"]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: ./.github/actions/prepare
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
poetry-version: ${{ matrix.poetry-version }}
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
poetry build
|
||||
|
||||
- name: Install package
|
||||
run: |
|
||||
pip install --upgrade dist/*.whl
|
||||
|
||||
- name: Upload to PyPI on release
|
||||
if: github.event_name == 'release'
|
||||
run: |
|
||||
poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}
|
||||
Reference in New Issue
Block a user