-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.25 KB
/
github-actions.yml
File metadata and controls
50 lines (46 loc) · 1.25 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
49
50
name: CI
on: [ push ]
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
env:
API_KEY: ${{ secrets.ETHERSCAN_TEST_API_KEY }}
INFURA_ID: ${{ secrets.WEB3_INFURA_PROJECT_ID_GOERLI }}
steps:
- uses: actions/checkout@v1
- name: Install tox
run: pip install tox
- name: Access to execution
run: chmod +x ${GITHUB_WORKSPACE}/run_tests.sh
- name: Run tests
run: ${GITHUB_WORKSPACE}/run_tests.sh $API_KEY $INFURA_ID
build-n-publish:
needs: tests
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@master
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_TOKEN }}