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

add .pypirc file in workflow

Browse files
Files changed (1) hide show
  1. .github/workflows/release.yaml +14 -6
.github/workflows/release.yaml CHANGED
@@ -80,12 +80,20 @@ jobs:
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 }}
 
 
 
 
 
 
 
 
 
80
  with:
81
  python-version: '3.x'
82
 
83
+ # Step 3: Install Flit
84
  - name: Install Flit
85
  run: pip install flit
86
 
87
+ # Step 4: Create .pypirc file
88
+ - name: Create .pypirc file
89
+ run: |
90
+ mkdir -p ~/.config/pypi
91
+ echo "[pypi]" > ~/.config/pypi/.pypirc
92
+ echo "username = __token__" >> ~/.config/pypi/.pypirc
93
+ echo "password = ${{ secrets.PYPI_API_TOKEN }}" >> ~/.config/pypi/.pypirc
94
+
95
+ # Step 5: Build and publish package
96
+ - name: Build and Publish Package
97
+ run: |
98
+ flit build
99
+ flit publish