-
Notifications
You must be signed in to change notification settings - Fork 14
54 lines (43 loc) · 1.55 KB
/
repostat_publish_to_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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Publish Repostat to PyPI
on:
push:
tags:
- v2.*
jobs:
build-n-publish:
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Build a binary wheel and a source tarball
run: |
python -m pip install --upgrade setuptools wheel --user
python setup.py sdist bdist_wheel
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
# This step is needed because Test PyPi does not necessary contains all deps for next step
- name: Install repostat dependencies
run: python -m pip install -r requirements.txt --user
- name: Install repostat from Test PyPi
run: python -m pip install --index-url https://test.pypi.org/simple/ repostat-app --user
- name: Run installed repostat launch script
run: |
export PATH=$HOME/.local/bin:$PATH
repostat --help
repostat . /tmp/repostat_output/ --no-browser --contribution
- name: Check generated report integrity
run: python tools/check_report_files.py /tmp/repostat_output/
- name: Publish distribution to PyPI
# if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}