add gitignroe and workflow #1
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 and Release Firmware | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install PlatformIO | |
| run: pip install platformio | |
| - name: Build firmware | |
| run: pio run -e sensebox_mcu_esp32s2 | |
| - name: Rename firmware | |
| run: | | |
| cp .pio/build/sensebox_mcu_esp32s2/firmware.bin firmware-${{ github.ref_name }}.bin | |
| - name: Create checksum | |
| run: sha256sum firmware-${{ github.ref_name }}.bin > firmware-${{ github.ref_name }}.bin.sha256 | |
| - name: Create Release and upload asset | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| firmware-${{ github.ref_name }}.bin | |
| firmware-${{ github.ref_name }}.bin.sha256 |