|
| 1 | +name: Build and release Bootloader for the esp32 series Soc |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + tag: |
| 7 | + description: "The tag where built tarballs are storing to" |
| 8 | + required: true |
| 9 | + default: "v0.8.0" |
| 10 | + |
| 11 | +jobs: |
| 12 | + build: |
| 13 | + permissions: |
| 14 | + contents: write |
| 15 | + |
| 16 | + runs-on: ubuntu-latest |
| 17 | + |
| 18 | + steps: |
| 19 | + - name: Install packages |
| 20 | + run: | |
| 21 | + sudo apt-get update |
| 22 | + sudo apt-get install -y build-essential pkg-config git |
| 23 | + |
| 24 | + - name: Build and install |
| 25 | + run: | |
| 26 | + git clone --branch v5.5.3 --depth 1 https://github.com/espressif/esp-idf |
| 27 | + cd esp-idf |
| 28 | + ./install.sh |
| 29 | + source ./export.sh |
| 30 | + cd examples/get-started/hello_world |
| 31 | + idf.py set-target esp32c3 |
| 32 | + idf.py build |
| 33 | +
|
| 34 | + - name: Get release page |
| 35 | + uses: octokit/request-action@v2.x |
| 36 | + id: get_release_page |
| 37 | + with: |
| 38 | + route: GET /repos/vivoblueos/toolchain/releases/tags/${{ github.event.inputs.tag }} |
| 39 | + env: |
| 40 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 41 | + |
| 42 | + - name: Get release url |
| 43 | + id: get_release_url |
| 44 | + run: | |
| 45 | + url=$(echo "${RESP}" | jq -r '.upload_url') |
| 46 | + echo "url=$url" >> $GITHUB_OUTPUT |
| 47 | + env: |
| 48 | + RESP: ${{ steps.get_release_page.outputs.data }} |
| 49 | + |
| 50 | + - name: Upload bootloader.bin |
| 51 | + uses: actions/upload-release-asset@v1 |
| 52 | + env: |
| 53 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 54 | + with: |
| 55 | + upload_url: ${{ steps.get_release_url.outputs.url }} |
| 56 | + asset_path: ${{ github.workspace }}/esp-idf/examples/get-started/hello_world/build/bootloader/bootloader.bin |
| 57 | + asset_name: esp32c3-bootloader.bin |
| 58 | + asset_content_type: application/octet-stream |
| 59 | + |
| 60 | + - name: Upload partition_table.bin |
| 61 | + uses: actions/upload-release-asset@v1 |
| 62 | + env: |
| 63 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 64 | + with: |
| 65 | + upload_url: ${{ steps.get_release_url.outputs.url }} |
| 66 | + asset_path: ${{ github.workspace }}/esp-idf/examples/get-started/hello_world/build/partition_table/partition_table.bin |
| 67 | + asset_name: esp32c3-partition_table.bin |
| 68 | + asset_content_type: application/octet-stream |
0 commit comments