Nightly Release #4
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: Nightly Release | |
| on: | |
| schedule: | |
| - cron: '0 2 * * *' # 2 AM UTC daily | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Release tag (default: today YYYY-MM-DD)' | |
| required: false | |
| jobs: | |
| generate-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| tag: ${{ steps.set-tag.outputs.tag }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Set matrix | |
| id: set-matrix | |
| run: | | |
| export EVENT_NAME="${{ github.event_name }}" | |
| export RUN_ATTEMPT="${{ github.run_attempt }}" | |
| export COMMIT_MESSAGE="" | |
| echo "matrix=$(bash ext/rusefi/firmware/bin/generate_matrix.sh boards)" >> $GITHUB_OUTPUT | |
| - name: Set release tag | |
| id: set-tag | |
| run: | | |
| if [ -n "${{ github.event.inputs.tag }}" ]; then | |
| echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "tag=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
| fi | |
| build: | |
| needs: generate-matrix | |
| runs-on: ubuntu-latest | |
| if: ${{ ! contains(needs.generate-matrix.outputs.matrix, '[]') }} | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: ./ext/rusefi/.github/workflows/custom-board-build | |
| with: | |
| meta_info: ${{ matrix.meta-info }} | |
| push: 'false' | |
| run_simulator: 'false' | |
| artifacts: bundle | |
| uploads: '' | |
| MY_REPO_PAT: ${{ secrets.MY_REPO_PAT }} | |
| ADDITIONAL_ENV: ${{ secrets.ADDITIONAL_ENV }} | |
| release: | |
| needs: [generate-matrix, build] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download bundle artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: downloaded/ | |
| pattern: 'rusefi_bundle_*' | |
| - name: Collect bundle ZIPs | |
| run: | | |
| mkdir -p bundles | |
| find downloaded/ -name "*.zip" -exec cp {} bundles/ \; | |
| - name: List bundles | |
| run: find bundles/ -type f | sort | |
| - name: Read changelog | |
| id: changelog | |
| run: | | |
| if [ -f CHANGELOG.md ]; then | |
| BODY=$(awk '/^## \[/{p++} p==1{print} p==2{exit}' CHANGELOG.md | tail -n +2) | |
| echo "body<<CHANGELOG_EOF" >> $GITHUB_OUTPUT | |
| echo "$BODY" >> $GITHUB_OUTPUT | |
| echo "CHANGELOG_EOF" >> $GITHUB_OUTPUT | |
| else | |
| echo "body=Automated nightly firmware build." >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.generate-matrix.outputs.tag }} | |
| name: Nightly ${{ needs.generate-matrix.outputs.tag }} | |
| prerelease: true | |
| body: | | |
| Automated nightly firmware build for Mazduino boards. | |
| ${{ steps.changelog.outputs.body }} | |
| ## Boards included | |
| - mazduino-compact (STM32F407VGT6, knock enabled) | |
| - mazduino-lite (STM32F407VGT6, no knock) | |
| - mazduino-mini6ch (STM32F427VGT6, ETB + traction control) | |
| - mazduino-mega100 (STM32F407VGT6, 1MB, full features, USB + CAN) | |
| - mazduino-mega100-512 (STM32F407VET6, 512KB, reduced feature set) | |
| ## Bundle contents | |
| Each `.zip` contains: | |
| - `rusefi_console.jar` - rusEFI desktop application (requires Java 11+) | |
| - `rusefi_<board>.ini` - TunerStudio definition file | |
| - `rusefi.bin` - firmware binary (flash via ST-Link or DFU) | |
| - Flash scripts (`flash_dfu.sh`, `flash_stlink.sh`) | |
| ## Flashing | |
| - ST-Link / SWD: run `flash_stlink.sh` or use STM32CubeProgrammer with `rusefi.bin` | |
| - USB DFU: hold BOOT0, then run `flash_dfu.sh` | |
| ## TunerStudio | |
| Launch `rusefi_console.jar` or open TunerStudio and point it to the `.ini` file for your board. | |
| files: bundles/* |