Skip to content

Commit

Permalink
Upload release assets and build artifacts
Browse files Browse the repository at this point in the history
Also, add UnexpectedMaker FeatherS2
  • Loading branch information
tannewt committed Sep 26, 2020
1 parent 47c7e86 commit 84ef7f3
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
name: Build

on: [pull_request, push, repository_dispatch]
on:
pull_request:
push:
repository_dispatch:
release:
types:
- created

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board: ['espressif_kaluga_1', 'espressif_saola_1_wroom', 'espressif_saola_1_wrover', 'microdev_micro_s2']
board:
- 'espressif_kaluga_1'
- 'espressif_saola_1_wroom'
- 'espressif_saola_1_wrover'
- 'microdev_micro_s2'
- 'unexpectedmaker_feathers2'
steps:
- name: Setup Python
uses: actions/setup-python@v1
Expand All @@ -23,3 +34,30 @@ jobs:

- name: Build
run: docker run --rm -v $PWD:/project -w /project espressif/idf:latest idf.py build -DBOARD=${{ matrix.board }}

- name: Rename release artifact
run: cp build/uf2-esp32s.bin uf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.bin
if: ${{ github.event_name == 'release' }}

- name: Rename artifact
run: cp build/uf2-esp32s.bin uf2-${{ matrix.board }}-$(git describe --always).bin

- name: List files
run: ls -a

- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.board }}
path: uf2-${{ matrix.board }}-*.bin

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./uf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.bin
asset_name: uf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.bin
asset_content_type: application/octet-stream
if: ${{ github.event_name == 'release' }}

0 comments on commit 84ef7f3

Please sign in to comment.