From 3aa8fa6f3e647d87b4ab89930da125ac5c98cef5 Mon Sep 17 00:00:00 2001 From: Ironbox Date: Wed, 25 Sep 2024 21:44:48 +0800 Subject: [PATCH 1/2] init exe --- .github/workflows/{publish-to-fofa-hack-pypi.yml => exe.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{publish-to-fofa-hack-pypi.yml => exe.yml} (100%) diff --git a/.github/workflows/publish-to-fofa-hack-pypi.yml b/.github/workflows/exe.yml similarity index 100% rename from .github/workflows/publish-to-fofa-hack-pypi.yml rename to .github/workflows/exe.yml From 17ca583225ed8cc2a21e47c5c818622bbbdc1fed Mon Sep 17 00:00:00 2001 From: Ironbox Date: Wed, 25 Sep 2024 21:47:22 +0800 Subject: [PATCH 2/2] rename --- .github/workflows/exe.yml | 49 ++++++++++++++++++++------------------- .gitignore | 1 + 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.github/workflows/exe.yml b/.github/workflows/exe.yml index 859803b0..588c491c 100644 --- a/.github/workflows/exe.yml +++ b/.github/workflows/exe.yml @@ -1,30 +1,31 @@ -name: Publish +name: BuildEXE on: push - - jobs: build: + runs-on: windows-latest + steps: + - name: 检出代码 + uses: actions/checkout@v2 - runs-on: ubuntu-latest + - name: 设置 Python 3 + uses: actions/setup-python@v4 + with: + python-version: '3.8' - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Build wheels and source tarball - run: | - python setup.py sdist build - - name: Publish open-autonomy Framework to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} - skip_existing: true - packages_dir: dist/ \ No newline at end of file + - name: 安装依赖 + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pyinstaller + + - name: 使用 PyInstaller 打包 + run: | + pyinstaller -F fofa.py + + - name: 上传可执行文件作为工件 + uses: actions/upload-artifact@v4 + with: + name: executable + path: dist\fofa.exe + retention-days: 1 \ No newline at end of file diff --git a/.gitignore b/.gitignore index fb5fdec5..51d5984d 100644 --- a/.gitignore +++ b/.gitignore @@ -134,3 +134,4 @@ dmypy.json # Pyre type checker .pyre/ +/fofa.iml