Spaces:
Running
Running
add .pypirc file in workflow
Browse files
.github/workflows/release.yaml
CHANGED
@@ -80,12 +80,20 @@ jobs:
|
|
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:
|
88 |
-
- name:
|
89 |
-
run:
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|