Merge pull request #84 from ElectronicCats/dev #31
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: Create Release on Tag | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*.*' | |
| - 'v*.*.*.*-*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: 'recursive' | |
| fetch-tags: true | |
| fetch-depth: 0 | |
| - name: Extract tag version (without 'v' prefix) | |
| id: extract_tag_wv | |
| run: echo "TAG_NAME=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
| - name: Update Kconfig.projbuild version | |
| run: | | |
| FILE=firmware/components/minino_config/Kconfig.projbuild | |
| sed -i "s/^default \".*\"/default \"${{ env.TAG_NAME }}\"/" $FILE | |
| - name: Extract tag version | |
| id: extract_tag | |
| run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - name: esp-idf build | |
| uses: espressif/esp-idf-ci-action@v1 | |
| with: | |
| esp_idf_version: v5.5.1 | |
| target: esp32c6 | |
| path: './firmware' | |
| command: "./get_builds.sh ${{ env.TAG_NAME }}" | |
| - name: Upload release artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: minino-release-${{ env.TAG_NAME }} | |
| path: ./firmware/minino-release-${{ env.TAG_NAME }} | |
| - name: Generate ChangeLog | |
| run: ./change change | |
| - name: Upload ChangeLog.md as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: changelog-${{ env.TAG_NAME }} | |
| path: ./ChangeLog.md | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Extract tag version | |
| id: extract_tag | |
| run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - name: Download release files | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: minino-release-${{ env.TAG_NAME }} | |
| path: ./release/ | |
| - name: Download ChangeLog.md artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: changelog-${{ env.TAG_NAME }} | |
| path: ./changelog/ | |
| - name: Set ChangeLog body | |
| id: set_changelog | |
| run: | | |
| BODY=$(cat ./changelog/ChangeLog.md) | |
| echo "BODY<<EOF" >> $GITHUB_ENV | |
| echo "$BODY" >> $GITHUB_ENV | |
| echo "EOF" >> $GITHUB_ENV | |
| - name: Release Firmware | |
| uses: ncipollo/release-action@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| artifacts: release/* | |
| generateReleaseNotes: true | |
| allowUpdates: true | |
| draft: true | |
| body: | | |
| ${{ env.BODY }} | |
| # Flashing release | |
| ## Minino | |
| ### Table for [ESP Tool](https://espressif.github.io/esptool-js/) | |
| | Flash Address | File | | |
| |---------------|----------------------------| | |
| | 0x0 | minino_${{ env.TAG_NAME }}.bin | | |
| | 0x0 | bsides_${{ env.TAG_NAME }}.bin | | |
| | 0x0 | dragonjar_${{ env.TAG_NAME }}.bin | | |
| | 0x0 | ekoparty_${{ env.TAG_NAME }}.bin | | |
| | 0x0 | bugcon_${{ env.TAG_NAME }}.bin | | |
| | 0x0 | bsseattle_${{ env.TAG_NAME }}.bin | | |
| ### Command | |
| ```bash | |
| 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 minino_${{ env.TAG_NAME }}.bin | |
| ``` |