-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (35 loc) · 1.06 KB
/
release-build-and-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build and Publish Python Package
on:
release:
types: [created]
jobs:
checks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10"]
poetry-version: ["1.6.1", "1.7.1"]
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup python and poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: install dependencies
run: poetry install --with test --without dev
- name: run the tests (sanity check)
run: |
poetry run pytest
- name: configure poetry
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- name: build and publish package
if: matrix.python-version == '3.10' && matrix.poetry-version == '1.7.1'
run: poetry publish --build