增加“制热”自动转“制冷”的功能 #57
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: Dev | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| config_name: [esp01s, esp32wroom32d, esp01s_nopass, esp01s_odd_nopass, esp01s_even_nopass] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Replace external_components with local path | |
| run: | | |
| for file in example/*.yaml; do | |
| sed -i '/external_components:/,/url:/c\ | |
| external_components:\ | |
| - source:\ | |
| type: local\ | |
| path: /github/workspace/components' "$file" | |
| done | |
| - name: Build | |
| id: esphome-build | |
| uses: esphome/build-action@v7.0.0 | |
| with: | |
| yaml-file: "example/${{ matrix.config_name }}.yaml" | |
| version: 2025.6.3 | |
| platform: linux/amd64 | |
| - name: Rename bin files | |
| run: | | |
| cd ${{ steps.esphome-build.outputs.name }} | |
| for file in *.bin; do | |
| if [[ $file == *"factory"* ]]; then | |
| mv "$file" "${{ matrix.config_name }}.factory.bin" | |
| elif [[ $file == *"ota"* ]]; then | |
| mv "$file" "${{ matrix.config_name }}.ota.bin" | |
| fi | |
| done | |
| ls -lha | |
| - name: Upload bin | |
| uses: actions/upload-artifact@v4.4.3 | |
| with: | |
| # Artifact name | |
| name: "${{ matrix.config_name }}-bin" | |
| # A file, directory or wildcard pattern that describes what to upload | |
| path: ${{ steps.esphome-build.outputs.name }}/*.bin | |
| # The desired behavior if no files are found using the provided path. | |
| retention-days: 3 | |
| notify: | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| steps: | |
| - name: Notify artifact link | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| hide_and_recreate: true | |
| hide_classify: "OUTDATED" | |
| message: | | |
| You can download the binary from the [Artifacts section](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) for debugging. | |
| - Commit Sha: ${{ github.event.pull_request.head.sha }} | |
| - Action run number: **${{ github.run_number }}** |