forked from testcontainers/testcontainers-python
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.13 KB
/
pypi-release.yml
File metadata and controls
42 lines (37 loc) · 1.13 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
name: Upload Python packages to PyPi
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-18.04
env:
python-version: 3.8
steps:
- uses: actions/checkout@v2
- name: Setup python ${{ env.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.python-version }}
- name: Cache Python dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles(format('requirements/{0}.txt', env.python-version)) }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install -r requirements/${{ env.python-version }}.txt
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python generate_version.py
python setup.py bdist_wheel
twine upload dist/*