From c2d5dd2b5601e46659f86cda8e2120d5621e22a9 Mon Sep 17 00:00:00 2001 From: Dimitris Mantzouranis Date: Thu, 19 Sep 2024 17:02:55 +0300 Subject: [PATCH] bump ci --- .github/workflows/auto_build.yml | 55 ++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/.github/workflows/auto_build.yml b/.github/workflows/auto_build.yml index d11ff40..e374c6f 100644 --- a/.github/workflows/auto_build.yml +++ b/.github/workflows/auto_build.yml @@ -1,25 +1,60 @@ -name: Compile Firmware +name: Compile Bootloaders on: push: - branches: - - master + branches: [ master ] + release: + types: + - published pull_request: - branches: - - master + workflow_dispatch: jobs: - Build: + build: runs-on: ubuntu-latest - container: debian:bullseye + container: debian:latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - name: Build jumploaders run: sh build.sh - - uses: actions/upload-artifact@v2 + - name: Find artifact files + id: find-files + run: | + find build/ -type f -name "*.bin" -print > artifact_files.txt + echo "ARTIFACT_FILES=$(cat artifact_files.txt)" >> $GITHUB_ENV + + - name: Print files for debugging + run: cat artifact_files.txt + + - name: Upload artifacts + uses: actions/upload-artifact@v3 with: name: Pre-Compiled Jumploaders - path: 'build/*.bin' + path: ${{ env.ARTIFACT_FILES }} + if-no-files-found: error + + publish_release: + name: Publish (Release) + runs-on: ubuntu-latest + + needs: [build] + + if: github.event.release.tag_name + + steps: + - uses: actions/download-artifact@v3 + with: + name: Pre-Compiled Jumploaders + path: build/ + + - uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + name: Release ${{ github.ref_name }} + files: build/*.bin + fail_on_unmatched_files: true