-
Notifications
You must be signed in to change notification settings - Fork 8
39 lines (31 loc) · 971 Bytes
/
publish.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: Build and upload to PyPI
on:
push:
tags:
- "*"
jobs:
build_and_upload:
name: Build and upload
runs-on: ubuntu-latest
steps:
- name: Checkout 🔁
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Set up Python 🐍
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 #v4.7.1
with:
python-version: "3.9"
- name: Install Poetry and pre-commit 💈
run: pip install poetry pre-commit
- name: Install dependencies 🛠
run: poetry install
- name: Run pre-commit 🤔
run: pre-commit run --all-files
- name: Run tests 🌈
run: poetry run invoke test
- name: Publish package to PyPI 🙌
run: |
set -e
poetry config http-basic.pypi "__token__" "${PYPI_TOKEN}"
poetry publish --build
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}