feat(ism330dl): Add maze game example with OLED and accelerometer. (#… #79
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: Release | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| release: | |
| name: Semantic Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write | |
| outputs: | |
| new-release-published: ${{ steps.semantic.outputs.new-release-published }} | |
| new-release-version: ${{ steps.semantic.outputs.new-release-version }} | |
| steps: | |
| - name: Generate token | |
| id: generate_token | |
| uses: tibdex/github-app-token@v2 | |
| with: | |
| app_id: ${{ secrets.RELEASE_APP_ID }} | |
| private_key: ${{ secrets.RELEASE_APP_SECRET }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.generate_token.outputs.token }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - name: Run semantic-release | |
| id: semantic | |
| env: | |
| GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | |
| HUSKY: "0" | |
| run: npx semantic-release | |
| micropython-firmware: | |
| name: Build and attach MicroPython firmware | |
| needs: release | |
| if: needs.release.outputs.new-release-published == 'true' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Generate token | |
| id: generate_token | |
| uses: tibdex/github-app-token@v2 | |
| with: | |
| app_id: ${{ secrets.RELEASE_APP_ID }} | |
| private_key: ${{ secrets.RELEASE_APP_SECRET }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: v${{ needs.release.outputs.new-release-version }} | |
| - name: Install ARM toolchain | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends gcc-arm-none-eabi libnewlib-arm-none-eabi | |
| - name: Build MicroPython firmware | |
| run: make micropython-firmware | |
| - name: Attach MicroPython firmware to release | |
| env: | |
| GH_TOKEN: ${{ steps.generate_token.outputs.token }} | |
| run: | | |
| VERSION="v${{ needs.release.outputs.new-release-version }}" | |
| BUILD_DIR=".build/micropython-steami/ports/stm32/build-STEAM32_WB55RG" | |
| cp "${BUILD_DIR}/firmware.hex" "steami-micropython-firmware-${VERSION}.hex" | |
| cp "${BUILD_DIR}/firmware.bin" "steami-micropython-firmware-${VERSION}.bin" | |
| gh release upload "$VERSION" \ | |
| "steami-micropython-firmware-${VERSION}.hex" \ | |
| "steami-micropython-firmware-${VERSION}.bin" \ | |
| --clobber | |
| daplink-firmware: | |
| name: Build and attach DAPLink firmware | |
| needs: release | |
| if: needs.release.outputs.new-release-published == 'true' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Generate token | |
| id: generate_token | |
| uses: tibdex/github-app-token@v2 | |
| with: | |
| app_id: ${{ secrets.RELEASE_APP_ID }} | |
| private_key: ${{ secrets.RELEASE_APP_SECRET }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: v${{ needs.release.outputs.new-release-version }} | |
| - name: Install build tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends ccache ninja-build python3-venv | |
| - name: Clone DAPLink (needed for venv cache key) | |
| run: make .build/DAPLink | |
| - name: Cache gcc-arm-none-eabi 10.3-2021.10 | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build/gcc-arm-none-eabi-10.3-2021.10 | |
| key: gcc-arm-none-eabi-10.3-2021.10-linux-x86_64 | |
| - name: Cache DAPLink Python venv | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build/DAPLink/venv | |
| key: daplink-venv-${{ runner.os }}-${{ hashFiles('.build/DAPLink/requirements.txt') }} | |
| - name: Build DAPLink firmware | |
| run: make daplink-firmware | |
| - name: Attach DAPLink firmware to release | |
| env: | |
| GH_TOKEN: ${{ steps.generate_token.outputs.token }} | |
| run: | | |
| VERSION="v${{ needs.release.outputs.new-release-version }}" | |
| BUILD_DIR=".build/DAPLink/projectfiles/make_gcc_arm/stm32f103xb_steami32_if/build" | |
| cp "${BUILD_DIR}/stm32f103xb_steami32_if_crc.bin" "steami-daplink-firmware-${VERSION}.bin" | |
| cp "${BUILD_DIR}/stm32f103xb_steami32_if_crc.hex" "steami-daplink-firmware-${VERSION}.hex" | |
| gh release upload "$VERSION" \ | |
| "steami-daplink-firmware-${VERSION}.bin" \ | |
| "steami-daplink-firmware-${VERSION}.hex" \ | |
| --clobber |