Skip to content

lift more logic out of the github workflow into the makefile #97

lift more logic out of the github workflow into the makefile

lift more logic out of the github workflow into the makefile #97

Workflow file for this run

name: Build & Publish
on:
push:
branches:
- '**' # Runs on pushes to any branch
pull_request:
branches:
- '**' # Runs on PRs targeting any branch
env:
LC_ALL: C
EXTRA_VERSION: ${{ github.run_number }}
jobs:

Check failure on line 14 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 14
build:
runs-on: ubuntu-latest
env:
COMMIT_SHA: ${{ github.sha }}
steps:
- uses: actions/checkout@v3
- name: Cache arduino dep downloads
uses: actions/cache@v3
with:
path: ${{ github.workspace}}/.arduino/downloads
key: ${{ runner.os }}-arduino-downloads
- run: make setup
- run: make all KALEIDOSCOPE_TEMP_PATH=${{ github.workspace}}/.kaleidoscope-temp
- name: Collect the commit SHAs of the build
run: make collect-build-info
- name: Add the NEWS as a changelog to the artifacts
run: cp NEWS.md output/firmware-changelog.md
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: firmwares
path: |
output/
publish: [ build ]
runs-on: ubuntu-latest
# Ensure this job only runs on pushes to master branch
if: github.ref == 'refs/heads/master'
env:
OUTPUT_DIR: artifacts/firmwares
steps:
- uses: actions/checkout@v3
- name: Discover the version tag
id: version
run: |
TAG=$(make version-tag)
echo "TAG=$TAG" >> $GITHUB_ENV
- name: Download artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Delete the snapshot release
if: ${{ contains(env.tag, 'snapshot') }}
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
shell: bash
run: |
make delete-tag-and-gh-release
- name: Create the release
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
run: |
make create-gh-release
- name: Package up the artifacts
shell: bash
run: |
make package-firmware-build
- name: Upload the firmware files & build info to the release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
run: |
make upload-gh-release