Feature: Color support for flash process and flash progress bar #322
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: Tasmota Esp Flasher | |
| on: | |
| workflow_dispatch: # Manually start a workflow | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| branches: | |
| - factory | |
| paths-ignore: | |
| - '.github/**' # Ignore changes towards the .github directory | |
| - '*.md' | |
| pull_request: | |
| branches: | |
| - factory | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| architecture: 'x64' | |
| - name: Install requirements | |
| run: | | |
| pip install -r requirements.txt -r requirements_build.txt | |
| pip install -e . | |
| - name: Check if the installed versions can run | |
| run: | | |
| esp_flasher -h | |
| - name: Run PyInstaller | |
| run: | | |
| python -m PyInstaller.__main__ -w -n ESP-Flasher -i icon.ico --add-data "esp_flasher/stubs/*.json;esp_flasher/stubs" esp_flasher\__main__.py | |
| - name: Test binary | |
| shell: bash | |
| run: | | |
| dist/ESP-Flasher/ESP-Flasher.exe -h | |
| - name: Create archive | |
| shell: bash | |
| run: | | |
| cd dist && 7z a -tzip ../ESP-Flasher-Windows.zip ESP-Flasher/ | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: Windows | |
| path: ESP-Flasher-Windows.zip | |
| build-ubuntu: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install libnotify-dev libsdl2-dev | |
| - name: Install requirements | |
| run: | | |
| pip install -r requirements.txt -r requirements_build.txt | |
| pip install -e . | |
| - name: Check if the installed versions can run | |
| run: | | |
| esp_flasher -h | |
| - name: Run PyInstaller | |
| run: | | |
| python -m PyInstaller.__main__ -w -n ESP-Flasher -i icon.ico --add-data "esp_flasher/stubs/*.json:esp_flasher/stubs" esp_flasher/__main__.py | |
| - name: Test binary | |
| shell: bash | |
| run: | | |
| dist/ESP-Flasher/ESP-Flasher -h | |
| - name: 'Tar files' | |
| run: tar -cvf Ubuntu.tar -C dist ESP-Flasher/ | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: Ubuntu | |
| path: Ubuntu.tar | |
| build-macos: | |
| runs-on: macos-15-intel | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install requirements | |
| run: | | |
| pip install -r requirements.txt -r requirements_build.txt | |
| pip install -e . | |
| - name: Check if the installed versions can run | |
| run: | | |
| esp_flasher -h | |
| - name: Run PyInstaller | |
| run: | | |
| python -m PyInstaller.__main__ -w -n ESP-Flasher -i icon.icns --add-data "esp_flasher/stubs/*.json:esp_flasher/stubs" esp_flasher/__main__.py | |
| - name: Test binary | |
| shell: bash | |
| run: | | |
| dist/ESP-Flasher/ESP-Flasher -h | |
| - name: Move app | |
| run: | | |
| mv dist/ESP-Flasher.app ESP-Flasher-macOS.app | |
| - name: 'Tar files' | |
| run: tar -cvf macOS.tar ESP-Flasher-macOS.app | |
| - name: 'Upload Artifact' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: macOS | |
| path: macOS.tar | |
| build-macos-arm: | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install requirements | |
| run: | | |
| pip install -r requirements.txt -r requirements_build.txt | |
| pip install -e . | |
| - name: Check if the installed versions can run | |
| run: | | |
| esp_flasher -h | |
| - name: Run PyInstaller | |
| run: | | |
| python -m PyInstaller.__main__ -w -n ESP-Flasher -i icon.icns --add-data "esp_flasher/stubs/*.json:esp_flasher/stubs" esp_flasher/__main__.py | |
| - name: Test binary | |
| shell: bash | |
| run: | | |
| dist/ESP-Flasher/ESP-Flasher -h | |
| - name: Move app | |
| run: | | |
| mv dist/ESP-Flasher.app ESP-Flasher-macOSarm.app | |
| - name: 'Tar files' | |
| run: tar -cvf macOSarm.tar ESP-Flasher-macOSarm.app | |
| - name: 'Upload Artifact' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: macOSarm | |
| path: macOSarm.tar | |
| release: | |
| name: Upload binaries to release section | |
| needs: [build-windows, build-ubuntu, build-macos, build-macos-arm] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: factory | |
| - name: Download built binaries artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: binary | |
| merge-multiple: true | |
| - name: Display downloaded artifact files | |
| run: | | |
| ls -R ./ | |
| - name: Release | |
| uses: jason2866/action-gh-release@v1.3 | |
| with: | |
| prerelease: false | |
| files: | | |
| binary/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |