Push a golioth beta release on main #219
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | ||
pull_request: | ||
push: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Fetch submodules | ||
run: | | ||
git submodule update --init --depth=1 | ||
( cd vendor/micropython/ports/unix ; make submodules ) | ||
( cd vendor/micropython/ports/esp32 ; make submodules ) | ||
- name: Test | ||
run: | | ||
make test | ||
- name: Build | ||
run: | | ||
rm -rf ./vendor/micropython/mpy-cross/build # Workaround build failure | ||
docker run -t -u "$UID:$GID" -e "HOME=/app" -v "${GITHUB_WORKSPACE}:/app" -w "/app" espressif/idf:v5.1.2 make | ||
shell: bash | ||
- name: Upload to Golioth (Main) | ||
if: if: {{ github.ref == 'ref/head/main' }} | ||
run: | | ||
python ./tools/upload-to-golioth.py | ||
env: | ||
GOLIOTH_PROJECT: ribbit | ||
# Beta V4 Blueprint | ||
GOLIOTH_BLUEPRINT: 65c3ebd0f4542d968bf23817 | ||
GOLIOTH_API_KEY: ${{ secrets.GOLIOTH_API_KEY }} | ||
shell: bash | ||
- name: Upload to Golioth (Release) | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: | | ||
python ./tools/upload-to-golioth.py | ||
env: | ||
GOLIOTH_PROJECT: ribbit | ||
# Production V4 Blueprint | ||
GOLIOTH_BLUEPRINT: 638a8a406a504ec89e7b18ee | ||
GOLIOTH_API_KEY: ${{ secrets.GOLIOTH_API_KEY }} | ||
shell: bash | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: firmware | ||
path: | | ||
firmware |