-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (45 loc) · 1.3 KB
/
Copy pathpython.yml
File metadata and controls
46 lines (45 loc) · 1.3 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
name: Python
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
with:
fetch-depth: 50
- name: Fetch all tags
run: git fetch --depth=1 origin '+refs/tags/*:refs/tags/*'
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Python dependencies
run: pip install --requirement requirements.txt
- name: Create .pypirc
run: |
cat <<EOF > ~/.pypirc
[pypi]
username = ${{ secrets.PYPI_USERNAME }}
password = ${{ secrets.PYPI_PASSWORD }}
[pypitest]
username = ${{ secrets.PYPI_USERNAME }}
password = ${{ secrets.PYPI_PASSWORD }}
EOF
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('templates/children/python/requirements.txt.jinja2') }}
restore-keys: ${{ runner.os }}-pip-
- name: Generate and build packages
run: make build-python
- name: Deploy packages
if: github.ref == 'refs/heads/master'
run: make deploy-python