Merge pull request #4 from BOSSincrypto/devin/1780093749-fix-race-con… #3
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: Build & Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| name: Windows | |
| ext: .exe | |
| - os: ubuntu-22.04 | |
| name: Linux | |
| ext: "" | |
| - os: macos-latest | |
| name: macOS | |
| ext: "" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| pip install -r requirements.txt | |
| pip install pyinstaller | |
| - name: Build executable | |
| run: | | |
| pyinstaller --onefile --windowed \ | |
| --collect-data customtkinter \ | |
| --collect-data magika \ | |
| --name MarkItDown \ | |
| run.py | |
| shell: bash | |
| - name: Rename portable artifact | |
| run: | | |
| cd dist | |
| if [ "${{ matrix.ext }}" = ".exe" ]; then | |
| cp MarkItDown.exe MarkItDown-Windows-Portable.exe | |
| else | |
| mv MarkItDown MarkItDown-${{ matrix.name }} | |
| chmod +x MarkItDown-${{ matrix.name }} | |
| fi | |
| shell: bash | |
| - name: Build Windows Installer | |
| if: matrix.os == 'windows-latest' | |
| env: | |
| APP_VERSION: ${{ github.ref_name }} | |
| run: iscc installer.iss | |
| shell: cmd | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: MarkItDown-${{ matrix.name }} | |
| path: | | |
| dist/MarkItDown-${{ matrix.name }}* | |
| dist/MarkItDown-Windows-Portable.exe | |
| dist/MarkItDown-Windows-Setup.exe | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: artifacts/**/* |