Fix TCP bridge hang when a client stalls or dies silently #139
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: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Determine version | |
| id: ver | |
| run: | | |
| if [ "${{ github.ref_type }}" = "tag" ]; then | |
| VERSION="${{ github.ref_name }}" | |
| else | |
| VERSION=$(git describe --always --tags 2>/dev/null || echo unknown) | |
| fi | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Build firmware | |
| uses: espressif/esp-idf-ci-action@v1 | |
| with: | |
| esp_idf_version: v5.5 | |
| target: esp32c6 | |
| path: '.' | |
| command: PROJECT_VER="${{ steps.ver.outputs.version }}" idf.py build | |
| - name: Install esptool | |
| run: pip install esptool | |
| - name: Stage release artifacts | |
| working-directory: build | |
| run: | | |
| VER="${{ steps.ver.outputs.version }}" | |
| mkdir -p ../artifacts | |
| cp pool-controller.bin "../artifacts/pool-controller-update-${VER}.bin" | |
| esptool.py --chip esp32c6 merge_bin \ | |
| -o "../artifacts/pool-controller-full-${VER}.bin" \ | |
| @flash_args | |
| - name: Upload workflow artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pool-controller-${{ steps.ver.outputs.version }} | |
| path: artifacts/*.bin | |
| if-no-files-found: error | |
| - name: Create draft release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| draft: true | |
| files: | | |
| artifacts/pool-controller-update-${{ steps.ver.outputs.version }}.bin | |
| artifacts/pool-controller-full-${{ steps.ver.outputs.version }}.bin | |
| generate_release_notes: true | |
| fail_on_unmatched_files: true | |
| - name: Publish release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release edit "${{ steps.ver.outputs.version }}" --draft=false --repo "${{ github.repository }}" |