-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.14 KB
/
build.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
name: Build
on: [push, pull_request]
jobs:
Test_Installation:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.2'
- name: Install dependencies
run: poetry install
- name: Build the package
run: poetry build
- name: Publish dry run
run: poetry publish --dry-run --skip-existing
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Publish to pypi
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
run: poetry publish --skip-existing
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}