-
Notifications
You must be signed in to change notification settings - Fork 8
53 lines (45 loc) · 1.28 KB
/
build.yml
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
name: Build
on:
push:
tags:
- '4.*.*'
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
jobs:
build-n-publish:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code/repo into the directory
uses: actions/checkout@v2
- name: Get the Ref
id: get-ref
uses: ankitvgupta/ref-to-tag-action@master
with:
ref: ${{ github.ref }}
head_ref: ${{ github.head_ref }}
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install pyp and decencies
run: |
python3 -m pip install --upgrade pip --user
python3 -m pip install setuptools wheel --user
python3 -m pip install --upgrade build --user
python3 -m pip install --upgrade twine --user
python3 -m pip install --upgrade wheel --user
- name: Build a binary wheel and a source tarball
run: |
python3 setup.py sdist
python3 setup.py bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}