-
Notifications
You must be signed in to change notification settings - Fork 147
38 lines (36 loc) · 1.01 KB
/
publish-pypi.yaml
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
name: Publish python package
on:
push:
tags:
- "v*.*.*"
jobs:
tests-ci:
strategy:
fail-fast: false
matrix:
python-version: [ 3.8 ] #we'll want to add other versions down the road
poetry-version: [ 1.1.13 ]
os: [ ubuntu-latest ] #in the future we should add windows here
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# install poetry first for cache
- name: setup poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Poetry install
run: poetry install
- name: run tests
run: poetry run pytest
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
plugins: "poetry-dynamic-versioning"