-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (58 loc) · 1.76 KB
/
build_and_publish.yml
File metadata and controls
70 lines (58 loc) · 1.76 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build and publish
on:
push:
branches:
- "**"
release:
types: [created]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python - --version 1.7.1
echo "${HOME}/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install --no-root
# - name: Run tests
# env:
# customer_id: ${{ secrets.CUSTOMER_ID }}
# client_Id: ${{ secrets.CLIENT_ID }}
# client_secret: ${{ secrets.CLIENT_SECRET }}
# run: poetry run pytest -s
publish:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install poetry
run: |
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python - --version 1.7.1
echo "${HOME}/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install --no-root
- name: Build wheels
run: |
poetry version $(git tag --points-at HEAD)
poetry build
- name: Upload to PyPI
env:
USERNAME: __token__
PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: poetry publish --username=$USERNAME --password=$PASSWORD