forked from Kater--S/MarQueTT
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (69 loc) · 2.2 KB
/
create-release.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build PlatformIO Project
run: pio run
# - name: Archive production artifacts
# uses: actions/upload-artifact@v2
# with:
# name: firmware
# path: .pio/build/**/mobiflight*.hex
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: .pio/build/d1_mini/firmware.bin
name: "marquettino-d1_mini-${{ github.ref_name }}.bin"
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: .pio/build/nodemcuv2/firmware.bin
name: "marquettino-nodemcuv2-${{ github.ref_name }}.bin"
build_release_binaries:
needs: create_release
runs-on: ubuntu-latest
strategy:
matrix:
# board: ["nodemcu", "d1_mini"]
board: ["d1_mini"]
steps:
- uses: actions/checkout@v2
name: Checkout code
- uses: arduino/[email protected]
name: Compile Sketch
with:
cli-compile-flags: |
- --output-dir
- "${{ matrix.board }}"
- -v
fqbn: "esp8266:esp8266:${{ matrix.board }} https://arduino.esp8266.com/stable/package_esp8266com_index.json"
sketch-paths: |
- ./
- name: Upload binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: "${{ matrix.board }}/MarQueTT.ino.bin"
asset_name: "marquettino-${{ matrix.board }}-${{ github.ref_name }}.bin"
asset_content_type: binary/octet-stream