File tree Expand file tree Collapse file tree 2 files changed +45
-10
lines changed Expand file tree Collapse file tree 2 files changed +45
-10
lines changed Original file line number Diff line number Diff line change 1+ name : Build and upload to PyPI 
2+ 
3+ on :
4+   workflow_dispatch :
5+   pull_request :
6+   push :
7+     branches :
8+       - main 
9+   release :
10+     types :
11+       - published 
12+ 
13+ jobs :
14+   build :
15+     name : Build source distribution 
16+     runs-on : ubuntu-latest 
17+     steps :
18+       - uses : actions/checkout@v4 
19+         with :
20+           submodules : true 
21+ 
22+       - name : Build 
23+         run : pipx run build 
24+ 
25+       - uses : actions/upload-artifact@v3 
26+         with :
27+           path : | 
28+             dist/*.tar.gz 
29+             dist/*.whl 
30+ 
31+    upload_pypi :
32+     needs : build 
33+     runs-on : ubuntu-latest 
34+     environment : release 
35+     permissions :
36+       id-token : write 
37+     if : github.event_name == 'release' && github.event.action == 'published' 
38+     steps :
39+       - uses : actions/download-artifact@v3 
40+         with :
41+           name : artifact 
42+           path : dist 
43+ 
44+       - uses : pypa/gh-action-pypi-publish@release/v1 
Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ version="${BASH_REMATCH[1]}"
2121date=" ${BASH_REMATCH[2]} " 
2222notes=" $( echo " ${BASH_REMATCH[3]} "   |  sed -n -E ' /^[0-9]+\.[0-9]+\.[0-9]+/,$!p' ) " 
2323
24- 
25- if  [[ " $date "   !=   " $( date +" %Y-%m-%d" ) "   ]];  then 
24+ if  [[ " $date "   !=  " $( date +" %Y-%m-%d" ) "   ]];  then 
2625    echo  " $date  is not today!" 
2726    exit  1
2827fi 
@@ -34,9 +33,6 @@ if [ -n "$(git status --porcelain)" ]; then
3433    exit  1
3534fi 
3635
37- #  Make sure release deps are installed with the current python
38- pip install -U sphinx wheel voluptuous email_validator twine geoip2
39- 
4036perl -pi -e " s/(?<=__version__ = \" ).+?(?=\" )/$version /g"   minfraud/version.py
4137perl -pi -e " s/(?<=^version = \" ).+?(?=\" )/$version /gsm"   pyproject.toml
4238
@@ -63,8 +59,3 @@ git push
6359gh release create --target " $( git branch --show-current) "   -t " $version "   -n " $notes "   " $tag " 
6460
6561git push --tags
66- 
67- rm -fr build dist
68- python -m sphinx -M html ./docs ./build/sphinx -W
69- python -m pipx run build
70- twine upload dist/* 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments