cyrusyc commited on
Commit
2708dcd
·
1 Parent(s): 45fb053

add pypi workflow

Browse files
Files changed (1) hide show
  1. .github/workflows/release.yaml +26 -0
.github/workflows/release.yaml CHANGED
@@ -63,3 +63,29 @@ jobs:
63
  tag_name: "v${{ env.VERSION }}"
64
  env:
65
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  tag_name: "v${{ env.VERSION }}"
64
  env:
65
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66
+
67
+ pypi:
68
+ name: Publish to PyPI
69
+ runs-on: ubuntu-latest
70
+ needs: release # This job runs after the release job
71
+
72
+ steps:
73
+ # Step 1: Checkout the code
74
+ - name: Checkout code
75
+ uses: actions/checkout@v3
76
+
77
+ # Step 2: Set up Python
78
+ - name: Set up Python
79
+ uses: actions/setup-python@v4
80
+ with:
81
+ python-version: '3.x'
82
+
83
+ # Step 3: Install Flit (for publishing)
84
+ - name: Install Flit
85
+ run: pip install flit
86
+
87
+ # Step 4: Publish to PyPI
88
+ - name: Publish to PyPI
89
+ run: flit publish
90
+ env:
91
+ FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}