Skip to content

Commit

Permalink
address #5: CI/CD yml for release publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
forGGe committed Aug 27, 2024
1 parent 306c6db commit fcb0bc5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
push:
tags:
- "v*.*.*"

jobs:
release_fw:
runs-on: ubuntu-latest
container:
image: espressif/idf:v5.3
steps:
- name: "Checkout files"
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: "Regular firmware build"
run: "./ci/build.sh"
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: webserver/build/tokay_lite.bin
9 changes: 9 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@

# TODO: print more information about the container

VERSTR=$(git describe --tags --dirty)

(ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
echo "IDF_PATH: $IDF_PATH"
echo "PATH: $PATH"
echo "VERSTR $VERSTR"

. "${IDF_PATH}/export.sh"
idf.py -C webserver build
cd webserver/build

echo "Generating single binary..."
# TODO: use VERSTR to encode version info into the file name
# and use it in the release.yml CI file
esptool.py --chip ESP32-S3 merge_bin -o tokay_lite.bin @flash_args

0 comments on commit fcb0bc5

Please sign in to comment.