Add Gitea OTA firmware update, dual-slot partition layout, and Gitea Actions release workflow
This commit is contained in:
57
.gitea/workflows/releases.yml
Normal file
57
.gitea/workflows/releases.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Build & Release Firmware
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build ESP32 Firmware
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: espressif/idf:v5.5
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Compile ESP32 firmware
|
||||
shell: bash
|
||||
run: |
|
||||
. $IDF_PATH/export.sh
|
||||
idf.py build
|
||||
|
||||
- name: Bundle release artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p release-dist
|
||||
# Primary OTA binary required by on-device update manager:
|
||||
cp build/mtg-rfid-companion.bin release-dist/
|
||||
# USB flashing bundle:
|
||||
cp build/bootloader/bootloader.bin release-dist/
|
||||
cp build/partition_table/partition-table.bin release-dist/
|
||||
cp build/storage.bin release-dist/
|
||||
cd release-dist
|
||||
tar -czvf full-flash-bundle-${{ gitea.ref_name || 'latest' }}.tar.gz *.bin
|
||||
cd ..
|
||||
|
||||
- name: Publish to Gitea Release
|
||||
uses: https://gitea.com/actions/release-action@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
files: |
|
||||
release-dist/mtg-rfid-companion.bin
|
||||
release-dist/full-flash-bundle-${{ gitea.ref_name || 'latest' }}.tar.gz
|
||||
name: "Release ${{ gitea.ref_name }}"
|
||||
draft: false
|
||||
prerelease: false
|
||||
api_key: ${{ secrets.RELEASE_TOKEN || gitea.token }}
|
||||
|
||||
- name: Upload Artifacts to Workflow
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mtg-firmware-${{ gitea.ref_name || 'manual' }}
|
||||
path: release-dist/*
|
||||
Reference in New Issue
Block a user