-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.08 KB
/
Copy pathpython-deploy.yml
File metadata and controls
48 lines (39 loc) · 1.08 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
name: python-deploy
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: setup python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.11
- name: pip caching
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.main.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r requirements.main.txt
- name: Build package
run: |
python setup.py bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}