-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (30 loc) · 926 Bytes
/
pypi.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
name: pypi
on:
release:
types: [published]
jobs:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
- name: Install dependencies
run: |
pip3 install .
pip3 install setuptools wheel
- name: Version check
run: |
LATEST_TAG=$(git describe --tags --abbrev=0 | cut -c 2-)
LATEST_PIP=$(python3 <<< "import statements_manager as ss; print(ss.__version__)")
if [ $LATEST_TAG != $LATEST_PIP ]; then
echo "different version: tag = ${LATEST_TAG}, pip = ${LATEST_PIP}"
exit 1
fi
- name: Build package
run: python3 setup.py bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}