forked from yaourdt/mgos-to-tasmota
-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (51 loc) · 1.68 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Mongoose Shelly build
on:
push:
branches: [ master ]
jobs:
release:
name: Create a new release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: release-${{ github.run_id }}
release_name: Release ${{ github.run_id }}
draft: false
prerelease: false
build:
name: Build for different Shelly models
needs: release
strategy:
matrix:
hwModel: [Shelly1, Shelly1L, Shelly1PM, ShellyPlugS, Shelly2, Shelly25, ShellyRGBW2, ShellyDimmer1, ShellyDimmer2, ShellyEM, ShellyBulb, ShellyVintage, ShellyPlugUS, ShellyHT, ShellyBulbDuo, ShellyI3, ShellyPlug2, ShellyUni, ShellyDuoRGBW]
hwPlatform: [esp8266]
targetFw: [tasmota]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
id: checkout_code
- name: Build firmware
uses: yaourdt/[email protected]
with:
mos-yml-path: .
platform: ${{ matrix.hwPlatform }}
build-var: MODEL=${{ matrix.hwModel }} --build-var TARGETFW=${{ matrix.targetFw }}
id: mos_build
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
id: upload-release-asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./build/fw.zip
asset_name: mg2${{ matrix.targetFw }}-${{ matrix.hwModel }}.zip
asset_content_type: application/zip