-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 932 Bytes
/
python-publish.yml
File metadata and controls
41 lines (32 loc) · 932 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
name: Upload Python Package
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install Poetry
uses: snok/install-poetry@v1.3.1
with:
version: 1.1.14
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set up Python
id: python
uses: actions/setup-python@v4
with:
python-version: '3.x'
cache: poetry
- name: Install dependencies
if: steps.python.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
- name: Build and publish
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry publish --build --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}"