File tree Expand file tree Collapse file tree 2 files changed +46
-31
lines changed
Expand file tree Collapse file tree 2 files changed +46
-31
lines changed Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-22.04
11+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Set up Python 3.8
17+ uses : actions/setup-python@v5
18+ with :
19+ python-version : 3.8
20+
21+ - name : Compare tags
22+ run : |
23+ VERSION = `grep '__version__' mapbox_tilesets/__init__.py | sed -E "s/^.*['\"](.*)['\"].*$/\1/"`
24+ echo "Checking that package version [v$VERSION] matches release tag [${{ github.ref_name }}]"
25+ [ "${{ github.ref_type }}" = "tag" ] && [ "${{ github.ref_name }}" = "v$VERSION" ]
26+
27+ - name : Upgrade pip and setuptools
28+ run : |
29+ python -m pip install --upgrade pip setuptools
30+
31+ - name : Install dependencies
32+ run : pip install twine wheel
33+
34+ - name : Setup deployment
35+ run : python setup.py sdist bdist_wheel
36+
37+ - name : Validate deployment
38+ run : twine check dist/*
39+
40+ - name : Run deployment
41+ run :
42+ twine upload dist/* -r pypi -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
Original file line number Diff line number Diff line change 1- name : CI
1+ name : Unit test
22
33on :
44 push :
@@ -45,38 +45,11 @@ jobs:
4545 - name : Run tests with coverage
4646 run : pytest --cov --cov-config=.coveragerc
4747
48+ - name : List all files in current directory
49+ run : ls -la
50+
4851 - name : Upload coverage to GitHub (optional, internal)
4952 uses : actions/upload-artifact@v4
5053 with :
5154 name : coverage-report
5255 path : .coverage
53-
54- deploy :
55- runs-on : ubuntu-22.04
56- needs : test
57- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
58-
59- steps :
60- - uses : actions/checkout@v4
61-
62- - name : Set up Python 3.8
63- uses : actions/setup-python@v5
64- with :
65- python-version : 3.8
66-
67- - name : Upgrade pip and setuptools
68- run : |
69- python -m pip install --upgrade pip setuptools
70-
71- - name : Install dependencies
72- run : pip install twine wheel
73-
74- - name : Setup deployment
75- run : python setup.py sdist bdist_wheel
76-
77- - name : Validate deployment
78- run : twine check dist/*
79-
80- - name : Run deployment
81- run :
82- twine upload dist/* -r pypi -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
You can’t perform that action at this time.
0 commit comments