Skip to content

Merge pull request #659 from BitMaker-hub/develop #31

Merge pull request #659 from BitMaker-hub/develop

Merge pull request #659 from BitMaker-hub/develop #31

Workflow file for this run

name: Nerdminer Pre-Release
on:
push:
branches:
- prerelease
jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version_step.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build PlatformIO Project
run: pio run
- name: Debug - Check generated files
run: |
echo "=== All .bin files found ==="
find . -name "*.bin" -type f
echo "=== Directory structure ==="
ls -la
echo "=== .pio/build contents ==="
find .pio/build -name "*.bin" -type f 2>/dev/null || echo "No .pio/build files"
echo "=== firmware directory ==="
ls -la firmware/ 2>/dev/null || echo "No firmware directory"
find firmware -name "*.bin" -type f 2>/dev/null || echo "No firmware .bin files"
echo "=== Script check ==="
ls -la post_build_merge.py
- name: Archive firmware files
uses: actions/upload-artifact@v4
with:
name: firmware-files-${{ github.sha }}
path: firmware/
if-no-files-found: error
- name: Get version
id: version_step
run: echo "version=`cat src/version.h | grep CURRENT_VERSION | awk -F\\" '{print $2}'`" >> $GITHUB_OUTPUT
prerelease:
needs: build
permissions:
contents: write
discussions: write
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/prerelease'
steps:
- name: Download firmware files
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/
name: firmware-files-${{ github.sha }}
- name: Debug - Check downloaded files
run: |
echo "=== Working directory ==="
pwd
ls -la
echo "=== All .bin files after download ==="
find . -name "*.bin" -type f
echo "=== firmware directory after download ==="
find firmware -type f 2>/dev/null || echo "No firmware directory found"
- name: Prerelease
uses: softprops/action-gh-release@v2
with:
name: nerdminer-prerelease-${{ needs.build.outputs.version }}
tag_name: nerdminer-prerelease-${{ needs.build.outputs.version }}
target_commitish: ${{ github.sha }}
generate_release_notes: true
prerelease: true
fail_on_unmatched_files: true
files: ${{ github.workspace }}/firmware/*/*.bin