-
Notifications
You must be signed in to change notification settings - Fork 17
34 lines (32 loc) · 957 Bytes
/
deploy.yml
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: Upload a new version to the PYPI
on:
release:
types: [created]
jobs:
check-and-publish:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-interaction
- name: Run tests
run: make test
- name: Set module version and publish it
run: |
poetry version ${GITHUB_REF_NAME#v}
poetry publish --build
env:
POETRY_HTTP_BASIC_INTERNAL_USERNAME: ${{ secrets.PYPI_LOGIN }}
POETRY_HTTP_BASIC_INTERNAL_PASSWORD: ${{ secrets.PYPI_PASSWORD }}