Update .gitea/workflows/releases.yml
Some checks failed
ESP-IDF Build & Release / build (push) Failing after 2m50s
Some checks failed
ESP-IDF Build & Release / build (push) Failing after 2m50s
This commit is contained in:
@@ -1,60 +1,52 @@
|
|||||||
name: Build & Release Firmware
|
name: ESP-IDF Build & Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build ESP32 Firmware
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: espressif/idf:release-v5.1
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Compile ESP32 firmware
|
container:
|
||||||
|
image: espressif/idf:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build firmware
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
. $IDF_PATH/export.sh
|
. /opt/esp/idf/export.sh
|
||||||
|
|
||||||
|
idf.py set-target esp32
|
||||||
idf.py build
|
idf.py build
|
||||||
|
|
||||||
- name: Bundle release artifacts
|
- name: Prepare release files
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release-dist
|
mkdir -p release
|
||||||
# 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: Upload Artifacts to Workflow
|
cp build/*.bin release/
|
||||||
uses: actions/upload-artifact@v4
|
cp build/bootloader/*.bin release/ 2>/dev/null || true
|
||||||
with:
|
cp build/partition_table/*.bin release/ 2>/dev/null || true
|
||||||
name: mtg-firmware-${{ gitea.ref_name || 'main' }}
|
|
||||||
path: release-dist/*
|
|
||||||
|
|
||||||
- name: Publish to Gitea Release
|
echo "Release files:"
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
ls -lh release/
|
||||||
uses: https://gitea.com/actions/release-action@main
|
|
||||||
continue-on-error: true
|
- name: Create release
|
||||||
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
|
server_url: ${{ github.server_url }}
|
||||||
|
repository: ${{ github.repository }}
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
tag_name: "build-${{ github.sha }}"
|
||||||
|
name: "ESP32 build ${{ github.sha }}"
|
||||||
|
body: |
|
||||||
|
Automated ESP-IDF firmware build.
|
||||||
|
|
||||||
|
Commit: ${{ github.sha }}
|
||||||
files: |
|
files: |
|
||||||
release-dist/mtg-rfid-companion.bin
|
release/*.bin
|
||||||
release-dist/full-flash-bundle-${{ gitea.ref_name }}.tar.gz
|
|
||||||
name: "Release ${{ gitea.ref_name }}"
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
api_key: ${{ secrets.RELEASE_TOKEN || gitea.token }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user