-
Notifications
You must be signed in to change notification settings - Fork 8
39 lines (39 loc) · 1.02 KB
/
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
39
name: pypi
on:
push:
tags: "v*"
jobs:
test:
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python }}"
- run: curl -sSL https://install.python-poetry.org | python3 -
shell: bash
- run: poetry install
shell: bash
- run: poetry run pytest
shell: bash
- run: poetry run mypy aws_error_utils --ignore-missing-imports
shell: bash
build-and-publish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: curl -sSL https://install.python-poetry.org | python3 -
shell: bash
- run: poetry build
shell: bash
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}