-
Notifications
You must be signed in to change notification settings - Fork 10
45 lines (35 loc) · 936 Bytes
/
pypi-publish.yml
File metadata and controls
45 lines (35 loc) · 936 Bytes
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
45
name: Publish to PyPI
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: 'main'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install pip tools
run: python -m pip install --upgrade pip setuptools wheel
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install
- name: Update dependencies
run: poetry update
- name: Run unit tests
run: poetry run test
- name: Publish package to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
run: poetry publish --build
- name: Clean up
if: always()
run: rm -rf dist