-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (45 loc) · 1.36 KB
/
build-and-deploy-release-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
55
56
57
name: Build and Upload Python Package
# on:
# release:
# types: [push]
on: [push]
permissions:
contents: read
id-token: write
jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install build tools
run: |
python -m pip install --upgrade pip setuptools wheel build twine
- name: Build distribution
run: |
python -m build --sdist
python -m build --wheel
- name: Check distribution
run: twine check dist/*
# - name: Upload to TestPyPI
# env:
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN}}
# run: |
# twine upload --repository testpypi dist/*
- name: Install package from TestPyPI
run: |
python -m pip install --upgrade pip
pip install --index-url https://test.pypi.org/simple/ placekey==0.0.16.2
pip install h3 shapely requests ratelimit backoff
- name: Run test query script
env:
PLACEKEY_API_KEY: ${{ secrets.PLACEKEY_API_KEY }}
run: python run_test_query.py
# - name: Upload to PyPi
# env:
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN}}
# run: |
# twine upload dist/*