From d0b3db9af646aeee92db02c62436a22065aa2b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lteri=C5=9F=20Ero=C4=9Flu?= Date: Sun, 13 Sep 2020 14:36:51 +0300 Subject: [PATCH 1/2] Move current conf to push only + auto pre-release --- .github/workflows/firmware-push.yml | 52 +++++++++++++++++++++++++++++ .github/workflows/firmware.yml | 39 ---------------------- 2 files changed, 52 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/firmware-push.yml delete mode 100644 .github/workflows/firmware.yml diff --git a/.github/workflows/firmware-push.yml b/.github/workflows/firmware-push.yml new file mode 100644 index 00000000..f818b878 --- /dev/null +++ b/.github/workflows/firmware-push.yml @@ -0,0 +1,52 @@ +name: Firmware Build (proxgrind Branch Push, Pre-release with Artifacts) + +on: + push: + branches: [ proxgrind ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Make a firmware build folder + run: mkdir FirmwareBuild + - name: Print Kernel Ver + run: uname -a + - name: Update APT + run: sudo apt-get update -yqq + - name: Install AVR GCC Suite + run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-avr binutils-avr gdb-avr avr-libc avrdude + - name: Make Firmware + run: make + working-directory: Firmware/Chameleon-Mini/ + - name: Move hex file to FirmwareBuild + run: mv Chameleon*.hex $GITHUB_WORKSPACE/FirmwareBuild/ + working-directory: Firmware/Chameleon-Mini/ + - name: Move eep file to FirmwareBuild + run: mv Chameleon*.eep $GITHUB_WORKSPACE/FirmwareBuild/ + working-directory: Firmware/Chameleon-Mini/ + - name: Upload Build Artifact to Action + uses: actions/upload-artifact@v2.1.4 + with: + name: "ChameleonBuild" + path: "FirmwareBuild/**" + - name: Create a Pre-release + uses: actions/create-release@v1.1.3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: "${{ format('Build-{0}', github.sha) }}" + release_name: Firmware Build ${{ github.sha }} + body: Built at commit ${{ github.sha }} from ${{ github.actor }} + draft: false + prerelease: true + - name: Upload Pre-release Artifacts + uses: linuxgemini/github-upload-release-artifacts-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + created_tag: "${{ format('Build-{0}', github.sha) }}" + args: "FirmwareBuild/" diff --git a/.github/workflows/firmware.yml b/.github/workflows/firmware.yml deleted file mode 100644 index 15027483..00000000 --- a/.github/workflows/firmware.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Firmware Build - -on: - push: - paths: - - "Firmware/**" - pull_request: - paths: - - "Firmware/**" - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Cleanup similar named things from root - run: rm Chameleon* - - name: Print Kernel Ver - run: uname -a - - name: Update APT - run: sudo apt-get update -yqq - - name: Install AVR GCC Suite - run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-avr binutils-avr gdb-avr avr-libc avrdude - - name: Make Firmware - run: make - working-directory: Firmware/Chameleon-Mini/ - - name: Move hex file to root - run: mv Chameleon*.hex $GITHUB_WORKSPACE/ - working-directory: Firmware/Chameleon-Mini/ - - name: Move eep file to root - run: mv Chameleon*.eep $GITHUB_WORKSPACE/ - working-directory: Firmware/Chameleon-Mini/ - - name: Upload Build Artifact - uses: actions/upload-artifact@v2.1.4 - with: - name: "ChameleonBuild" - path: "Chameleon*.*" From e356af95a78b27b9e0bf6bc8c2f85a07ed9220bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lteri=C5=9F=20Ero=C4=9Flu?= Date: Sun, 13 Sep 2020 14:37:27 +0300 Subject: [PATCH 2/2] Create firmware-pr.yml --- .github/workflows/firmware-pr.yml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/firmware-pr.yml diff --git a/.github/workflows/firmware-pr.yml b/.github/workflows/firmware-pr.yml new file mode 100644 index 00000000..3241e7bc --- /dev/null +++ b/.github/workflows/firmware-pr.yml @@ -0,0 +1,36 @@ +name: Firmware Build (Pull Request, Firmware Modified, Artifact in build job) + +on: + pull_request: + paths: + - "Firmware/**" + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Make a firmware build folder + run: mkdir FirmwareBuild + - name: Print Kernel Ver + run: uname -a + - name: Update APT + run: sudo apt-get update -yqq + - name: Install AVR GCC Suite + run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-avr binutils-avr gdb-avr avr-libc avrdude + - name: Make Firmware + run: make + working-directory: Firmware/Chameleon-Mini/ + - name: Move hex file to FirmwareBuild + run: mv Chameleon*.hex $GITHUB_WORKSPACE/FirmwareBuild/ + working-directory: Firmware/Chameleon-Mini/ + - name: Move eep file to FirmwareBuild + run: mv Chameleon*.eep $GITHUB_WORKSPACE/FirmwareBuild/ + working-directory: Firmware/Chameleon-Mini/ + - name: Upload Build Artifact to Action + uses: actions/upload-artifact@v2.1.4 + with: + name: "ChameleonBuild" + path: "FirmwareBuild/**"