-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (45 loc) · 1.53 KB
/
release-client-libclient-py.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
name: Push libclient-py Package for Pypi
# NOTE:
# The version of the python library is automatically generated by setuptools_scm from the git tag and the distance of the commit hash.
# When uploading to pypi, the version of the tag is `[0-9]+.[0-9]+.[0-9]+.` If a tag is not in this format, or if an action other than a tag is triggered, pypi will generate a version format error.
# Therefore, the client module must be in the format `[0-9]+.[0-9]+.[0-9]+.`
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
build_and_push_libc:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Install pypa/build
run: >-
python -m
pip install
build
twine
setuptools_scm
--user
working-directory: ./packages/client/libclient-py/
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
working-directory: ./packages/client/libclient-py/
- name: Publish distribution 📦 to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload --repository pypi dist/*
working-directory: ./packages/client/libclient-py/