|
| 1 | +name: Create Release on Tag |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*.*.*.*' |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: write |
| 10 | + |
| 11 | +jobs: |
| 12 | + build: |
| 13 | + strategy: |
| 14 | + fail-fast: true |
| 15 | + runs-on: ubuntu-latest |
| 16 | + |
| 17 | + steps: |
| 18 | + - name: Checkout repo |
| 19 | + uses: actions/checkout@v3 |
| 20 | + with: |
| 21 | + submodules: 'recursive' |
| 22 | + fetch-tags: true |
| 23 | + fetch-depth: 0 |
| 24 | + |
| 25 | + - name: Extract tag version |
| 26 | + id: extract_tag |
| 27 | + run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV |
| 28 | + |
| 29 | + - name: esp-idf build |
| 30 | + uses: espressif/esp-idf-ci-action@v1 |
| 31 | + with: |
| 32 | + esp_idf_version: v5.3.2 |
| 33 | + target: esp32c6 |
| 34 | + path: './firmware' |
| 35 | + command: "./get_builds.sh ${{ env.TAG_NAME }}" |
| 36 | + |
| 37 | + |
| 38 | + - name: Upload release artifact |
| 39 | + uses: actions/upload-artifact@v4 |
| 40 | + with: |
| 41 | + name: minino-release-${{ env.TAG_NAME }} |
| 42 | + path: ./firmware/minino-release-${{ env.TAG_NAME }} |
| 43 | + |
| 44 | + - name: Generate ChangeLog |
| 45 | + run: ./change change |
| 46 | + |
| 47 | + - name: Upload ChangeLog.md as artifact |
| 48 | + uses: actions/upload-artifact@v4 |
| 49 | + with: |
| 50 | + name: changelog-${{ env.TAG_NAME }} |
| 51 | + path: ./ChangeLog.md |
| 52 | + |
| 53 | + release: |
| 54 | + needs: build |
| 55 | + runs-on: ubuntu-latest |
| 56 | + steps: |
| 57 | + |
| 58 | + - name: Extract tag version |
| 59 | + id: extract_tag |
| 60 | + run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV |
| 61 | + |
| 62 | + - name: Download release files |
| 63 | + uses: actions/download-artifact@v4 |
| 64 | + with: |
| 65 | + name: minino-release-${{ env.TAG_NAME }} |
| 66 | + path: ./release/ |
| 67 | + |
| 68 | + - name: Download ChangeLog.md artifact |
| 69 | + uses: actions/download-artifact@v4 |
| 70 | + with: |
| 71 | + name: changelog-${{ env.TAG_NAME }} |
| 72 | + path: ./changelog/ |
| 73 | + |
| 74 | + - name: Set ChangeLog body |
| 75 | + id: set_changelog |
| 76 | + run: | |
| 77 | + BODY=$(cat ./changelog/ChangeLog.md) |
| 78 | + echo "BODY<<EOF" >> $GITHUB_ENV |
| 79 | + echo "$BODY" >> $GITHUB_ENV |
| 80 | + echo "EOF" >> $GITHUB_ENV |
| 81 | +
|
| 82 | + - name: Release Firmware |
| 83 | + uses: ncipollo/release-action@v1 |
| 84 | + if: startsWith(github.ref, 'refs/tags/') |
| 85 | + with: |
| 86 | + artifacts: release/* |
| 87 | + generateReleaseNotes: true |
| 88 | + allowUpdates: true |
| 89 | + draft: true |
| 90 | + body: | |
| 91 | + ${{ env.BODY }} |
| 92 | + # Flashing release |
| 93 | + ## Minino |
| 94 | + ### Table for [ESP Tool](https://espressif.github.io/esptool-js/) |
| 95 | + | Flash Address | File | |
| 96 | + |---------------|----------------------------| |
| 97 | + | 0x0 | minino_${{ env.TAG_NAME }}.bin | |
| 98 | +
|
| 99 | + ### Command |
| 100 | +
|
| 101 | + ```bash |
| 102 | + python -m esptool --chip esp32c6 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 8MB --flash_freq 80m 0x0 minino_${{ env.TAG_NAME }}.bin |
| 103 | + ``` |
| 104 | +
|
| 105 | + ## BSides |
| 106 | + ### Table for [ESP Tool](https://espressif.github.io/esptool-js/) |
| 107 | + | Flash Address | File | |
| 108 | + |---------------|----------------------------| |
| 109 | + | 0x0 | bsides_${{ env.TAG_NAME }}.bin | |
| 110 | +
|
| 111 | + ### Command |
| 112 | +
|
| 113 | + ```bash |
| 114 | + python -m esptool --chip esp32c6 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 4MB --flash_freq 80m 0x0 bsides_${{ env.TAG_NAME }}.bin |
| 115 | + ``` |
| 116 | +
|
| 117 | + ## DragonJar |
| 118 | + ### Table for [ESP Tool](https://espressif.github.io/esptool-js/) |
| 119 | + | Flash Address | File | |
| 120 | + |---------------|----------------------------| |
| 121 | + | 0x0 | dragonjar_${{ env.TAG_NAME }}.bin | |
| 122 | +
|
| 123 | + ### Command |
| 124 | +
|
| 125 | + ```bash |
| 126 | + python -m esptool --chip esp32c6 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 4MB --flash_freq 80m 0x0 dragonjar_${{ env.TAG_NAME }}.bin |
| 127 | + ``` |
| 128 | +
|
| 129 | + ## EkoParty |
| 130 | + ### Table for [ESP Tool](https://espressif.github.io/esptool-js/) |
| 131 | + | Flash Address | File | |
| 132 | + |---------------|----------------------------| |
| 133 | + | 0x0 | ekoparty_${{ env.TAG_NAME }}.bin | |
| 134 | +
|
| 135 | + ### Command |
| 136 | +
|
| 137 | + ```bash |
| 138 | + python -m esptool --chip esp32c6 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 4MB --flash_freq 80m 0x0 ekoparty_${{ env.TAG_NAME }}.bin |
| 139 | + ``` |
| 140 | +
|
| 141 | + ## BugCon |
| 142 | + ### Table for [ESP Tool](https://espressif.github.io/esptool-js/) |
| 143 | + | Flash Address | File | |
| 144 | + |---------------|----------------------------| |
| 145 | + | 0x0 | bugcon_${{ env.TAG_NAME }}.bin | |
| 146 | +
|
| 147 | + ### Command |
| 148 | +
|
| 149 | + ```bash |
| 150 | + python -m esptool --chip esp32c6 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 4MB --flash_freq 80m 0x0 bugcon_${{ env.TAG_NAME }}.bin |
| 151 | + ``` |
0 commit comments