Просмотр исходного кода

feat: 增加配置文件复制

cheng zhen 1 год назад
Родитель
Сommit
5d04e0b226
2 измененных файлов с 18 добавлено и 2 удалено
  1. 17 1
      .github/workflows/build.yml
  2. 1 1
      cursor_pro_keep_alive.py

+ 17 - 1
.github/workflows/build.yml

@@ -27,6 +27,10 @@ jobs:
       run: |
         pyinstaller CursorKeepAlive.spec
         
+    - name: Copy and rename env file
+      run: |
+        copy .env.example dist\.env
+        
     - name: Upload Windows artifact
       uses: actions/upload-artifact@v4
       with:
@@ -54,6 +58,10 @@ jobs:
       run: |
         pyinstaller CursorKeepAlive.spec
         
+    - name: Copy and rename env file
+      run: |
+        cp .env.example dist/.env
+        
     - name: Upload MacOS ARM artifact
       uses: actions/upload-artifact@v4
       with:
@@ -81,6 +89,10 @@ jobs:
       run: |
         pyinstaller CursorKeepAlive.spec
         
+    - name: Copy and rename env file
+      run: |
+        cp .env.example dist/.env
+        
     - name: Upload Linux artifact
       uses: actions/upload-artifact@v4
       with:
@@ -109,7 +121,11 @@ jobs:
         TARGET_ARCH: 'x86_64'
       run: |
         arch -x86_64 python3 -m PyInstaller CursorKeepAlive.spec
-
+        
+    - name: Copy and rename env file
+      run: |
+        cp .env.example dist/.env
+        
     - name: Verify architecture
       run: |
         file dist/CursorPro | grep "x86_64" || (echo "Wrong architecture" && exit 1)

+ 1 - 1
cursor_pro_keep_alive.py

@@ -149,7 +149,7 @@ def sign_up_account(browser, tab):
             if tab.ele("Account Settings"):
                 break
             if tab.ele("@data-index=0"):
-                code = email_handler.get_verification_code(account)
+                code = email_handler.get_verification_code()
                 if not code:
                     return False