Skip to content

Commit

Permalink
Delete poetry.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
5656565566 committed Jan 31, 2025
1 parent cd8093d commit 8f38916
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 7,346 deletions.
99 changes: 80 additions & 19 deletions .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,52 @@ permissions:
contents: write

jobs:
build-and-release:
windows-build:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: 'x64'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry pyinstaller
poetry install
poetry run python -m pip install pyinstaller
- name: Install Windows build tools
run: |
choco install -y vcredist2010 vcredist2013 vcredist140
- name: Build with PyInstaller
run: |
poetry run pyinstaller -F actuator/__main__.py `
--icon logo.ico `
--name "actuator-${{ github.ref_name }}-windows-amd64" `
--collect-all paddleocr `
--collect-all pyclipper `
--collect-all imghdr `
--collect-all skimage `
--collect-all imgaug `
--collect-all scipy.io `
--collect-all lmdb `
--collect-all paddle `
--collect-all lupa
- name: Upload Windows Artifact
uses: actions/upload-artifact@v4
with:
name: windows-executable
path: dist/actuator-${{ github.ref_name }}-windows-amd64.exe

linux-build:
runs-on: ubuntu-latest

steps:
Expand All @@ -31,7 +76,7 @@ jobs:
- name: Build Executable
run: |
poetry run pyinstaller -F actuator/__main__.py \
--icon logo.ico \
--name "actuator-${{ github.ref_name }}-linux-amd64" \
--collect-all paddleocr \
--collect-all pyclipper \
--collect-all imghdr \
Expand All @@ -41,24 +86,40 @@ jobs:
--collect-all lmdb \
--collect-all paddle \
--collect-all lupa
- name: Upload Linux Artifact
uses: actions/upload-artifact@v4
with:
name: linux-executable
path: dist/actuator-${{ github.ref_name }}-linux-amd64

create-release:
name: Create Unified Release
needs: [windows-build, linux-build]
runs-on: ubuntu-latest

steps:
- name: Download Windows Artifact
uses: actions/download-artifact@v4
with:
name: windows-executable

- name: Download Linux Artifact
uses: actions/download-artifact@v4
with:
name: linux-executable

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
name: "Release ${{ github.ref_name }}"
body: |
Multi-platform build includes:
- Windows Executable (.exe)
- Linux Binary
files: |
actuator-${{ github.ref_name }}-windows-amd64.exe
actuator-${{ github.ref_name }}-linux-amd64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/__main__
asset_name: application-${{ github.ref_name }}.exe
asset_content_type: application/octet-stream
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
poetry.lock

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
Loading

0 comments on commit 8f38916

Please sign in to comment.