fix: fix missing dll for windows binary #61
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: New Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Build Changelog | |
| id: github_release | |
| uses: mikepenz/release-changelog-builder-action@v3 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| configurationJson: | | |
| { | |
| "template": "## What's Changed\n\n<details>\n<summary>Uncategorized</summary>\n\n#{{UNCATEGORIZED}}\n</details>\n\nIf you find this project useful, please consider [sponsoring](https://ko-fi.com/vietanhdev) its development.", | |
| "categories": [ | |
| { | |
| "title": "## 🚀 Features", | |
| "labels": ["feature"] | |
| }, | |
| { | |
| "title": "## 🐛 Fixes", | |
| "labels": ["fix"] | |
| }, | |
| { | |
| "title": "## 💬 Other", | |
| "labels": ["other"] | |
| } | |
| ] | |
| } | |
| - name: Create Release | |
| id: create_release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body: ${{steps.github_release.outputs.changelog}} | |
| draft: true | |
| prerelease: true | |
| tag_name: ${{ github.ref_name }} | |
| make_latest: 'false' | |
| fail_on_unmatched_files: false | |
| build: | |
| needs: [release] | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| device: [CPU, GPU] | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| python-version: "3.12" | |
| miniconda-version: "latest" | |
| - name: Set preferred device | |
| shell: bash -l {0} | |
| run: >- | |
| sed -i'' -e 's/\_\_preferred_device\_\_[ ]*=[ ]*\"[A-Za-z0-9]*\"/__preferred_device__ = "${{ matrix.device }}"/g' anylabeling/app_info.py | |
| - name: Install main | |
| shell: bash -l {0} | |
| run: | | |
| pip install . | |
| - name: Run pyinstaller | |
| shell: bash -l {0} | |
| run: | | |
| pip install pyinstaller | |
| pyinstaller anylabeling.spec | |
| - name: Rename executables with better naming convention | |
| shell: bash -l {0} | |
| run: | | |
| if [ "${{ runner.os }}" == "Linux" ]; then | |
| if [ -f "./dist/anylabeling" ]; then | |
| mv ./dist/anylabeling ./dist/AnyLabeling-Linux-${{ matrix.device }}-x64 | |
| fi | |
| elif [ "${{ runner.os }}" == "Windows" ]; then | |
| if [ -f "./dist/anylabeling.exe" ]; then | |
| mv ./dist/anylabeling.exe ./dist/AnyLabeling-Windows-${{ matrix.device }}-x64.exe | |
| fi | |
| fi | |
| - name: Upload Linux/Windows Release Assets | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| files: | | |
| ./dist/AnyLabeling-* | |
| fail_on_unmatched_files: false | |
| append_body: true | |
| preserve_order: true | |
| if: success() | |
| build_macos_folder: | |
| needs: [release] | |
| runs-on: macos-latest | |
| permissions: | |
| contents: write | |
| strategy: | |
| matrix: | |
| device: [CPU, GPU] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| python-version: "3.12" | |
| miniconda-version: "latest" | |
| - name: Install PyQt6 for macOS | |
| shell: bash -l {0} | |
| run: | | |
| pip install PyQt6 | |
| - name: Install main | |
| shell: bash -l {0} | |
| run: | | |
| pip install -e . | |
| - name: Make build script executable | |
| shell: bash -l {0} | |
| run: | | |
| chmod +x scripts/build_macos_folder.sh | |
| - name: Build in folder mode | |
| shell: bash -l {0} | |
| run: | | |
| ./scripts/build_macos_folder.sh ${{ matrix.device }} | |
| - name: Rename macOS folder with better naming convention | |
| shell: bash -l {0} | |
| run: | | |
| mv dist/AnyLabeling-Folder${{ matrix.device == 'GPU' && '-GPU' || '' }} dist/AnyLabeling-macOS-${{ matrix.device }} | |
| - name: Create zip archive | |
| shell: bash -l {0} | |
| run: | | |
| cd dist && zip -r AnyLabeling-macOS-${{ matrix.device }}.zip AnyLabeling-macOS-${{ matrix.device }}/ | |
| - name: Upload macOS Folder Build Assets | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| files: ./dist/AnyLabeling-macOS-${{ matrix.device }}.zip | |
| append_body: true | |
| preserve_order: true | |
| if: success() |