Skip to content

Commit

Permalink
feat: Add CI release
Browse files Browse the repository at this point in the history
- Release OTA
- Release No OTA
  • Loading branch information
JahazielLem committed Aug 30, 2024
1 parent c04c0ea commit 1d61713
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 2 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
push:
tags:
- 'v*'
pull_request:

permissions:
contents: write
name: Build
jobs:
build:
strategy:
fail-fast: true
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-tags: true
fetch-depth: 0

- name: Add version
run: git describe --tags | sed 's/-[^-]*$//' > version.txt

- name: esp-idf build
uses: espressif/esp-idf-ci-action@v1
with:
#source https://hub.docker.com/r/espressif/idf/tags
esp_idf_version: v5.4-dev
target: esp32c6
path: './firmware'

- name: Archive Firmware Files
uses: actions/upload-artifact@v4
with:
name: minino-firmware
path: "./firmware/build/"

release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Firmware Files
uses: actions/download-artifact@v4
with:
path: release
- name: Release Firmware
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
artifacts: release/*/*.bin
generateReleaseNotes: true
allowUpdates: true
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ hardware/minino-backups/
/**/.DS_Store

# Firmware binaries
/**/build/
/**/build*
/**/build/*
/**/managed_components/
/**/build_files/
/**/build_files.tgz
Expand Down

0 comments on commit 1d61713

Please sign in to comment.