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:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build ESP32 Firmware
|
||||
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
|
||||
run: |
|
||||
. $IDF_PATH/export.sh
|
||||
. /opt/esp/idf/export.sh
|
||||
|
||||
idf.py set-target esp32
|
||||
idf.py build
|
||||
|
||||
- name: Bundle release artifacts
|
||||
- name: Prepare release files
|
||||
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 ..
|
||||
mkdir -p release
|
||||
|
||||
- name: Upload Artifacts to Workflow
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mtg-firmware-${{ gitea.ref_name || 'main' }}
|
||||
path: release-dist/*
|
||||
cp build/*.bin release/
|
||||
cp build/bootloader/*.bin release/ 2>/dev/null || true
|
||||
cp build/partition_table/*.bin release/ 2>/dev/null || true
|
||||
|
||||
- name: Publish to Gitea Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
continue-on-error: true
|
||||
echo "Release files:"
|
||||
ls -lh release/
|
||||
|
||||
- name: Create release
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
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: |
|
||||
release-dist/mtg-rfid-companion.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 }}
|
||||
release/*.bin
|
||||
|
||||
Reference in New Issue
Block a user