Skip to content

Commit

Permalink
Merge pull request #39 from linuxgemini/ghactions-improved
Browse files Browse the repository at this point in the history
Improved Github Actions
  • Loading branch information
iceman1001 authored Sep 13, 2020
2 parents 6b5857e + e356af9 commit 152dc71
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Firmware Build
name: Firmware Build (Pull Request, Firmware Modified, Artifact in build job)

on:
push:
paths:
- "Firmware/**"
pull_request:
paths:
- "Firmware/**"
Expand All @@ -15,8 +12,8 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Cleanup similar named things from root
run: rm Chameleon*
- name: Make a firmware build folder
run: mkdir FirmwareBuild
- name: Print Kernel Ver
run: uname -a
- name: Update APT
Expand All @@ -26,14 +23,14 @@ jobs:
- name: Make Firmware
run: make
working-directory: Firmware/Chameleon-Mini/
- name: Move hex file to root
run: mv Chameleon*.hex $GITHUB_WORKSPACE/
- name: Move hex file to FirmwareBuild
run: mv Chameleon*.hex $GITHUB_WORKSPACE/FirmwareBuild/
working-directory: Firmware/Chameleon-Mini/
- name: Move eep file to root
run: mv Chameleon*.eep $GITHUB_WORKSPACE/
- name: Move eep file to FirmwareBuild
run: mv Chameleon*.eep $GITHUB_WORKSPACE/FirmwareBuild/
working-directory: Firmware/Chameleon-Mini/
- name: Upload Build Artifact
- name: Upload Build Artifact to Action
uses: actions/upload-artifact@v2.1.4
with:
name: "ChameleonBuild"
path: "Chameleon*.*"
path: "FirmwareBuild/**"
52 changes: 52 additions & 0 deletions .github/workflows/firmware-push.yml
Original file line number Diff line number Diff line change
@@ -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/"

0 comments on commit 152dc71

Please sign in to comment.