-
Notifications
You must be signed in to change notification settings - Fork 5
34 lines (30 loc) · 858 Bytes
/
publish.yml
File metadata and controls
34 lines (30 loc) · 858 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
name: Publish Python 🐍 distributions 📦 to PyPI
on:
push:
tags:
- '*'
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-0
- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
- name: Publish to TestPyPi
run: |
poetry version ${{ github.ref_name }}
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
poetry publish --build