Skip to content

Commit 9449993

Browse files
authored
Upload binaries to gh release (#18)
1 parent 0ad2e20 commit 9449993

File tree

3 files changed

+54
-88
lines changed

3 files changed

+54
-88
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
- name: Checkout source code
2828
uses: actions/[email protected]
2929
- name: ESPHome ${{ matrix.esphome-version }}
30-
uses: esphome/[email protected].1
30+
uses: esphome/[email protected].3
3131
with:
3232
yaml-file: ${{ matrix.file }}.yaml
3333
version: ${{ matrix.esphome-version }}
3434
- name: ESPHome ${{ matrix.esphome-version }} Factory
35-
uses: esphome/[email protected].1
35+
uses: esphome/[email protected].3
3636
with:
3737
yaml-file: ${{ matrix.file }}.factory.yaml
3838
version: ${{ matrix.esphome-version }}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Publish Firmware
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-firmware:
9+
name: Build Firmware
10+
uses: esphome/workflows/.github/workflows/[email protected]
11+
with:
12+
files: |
13+
project-template-esp32.factory.yaml
14+
project-template-esp32-c3.factory.yaml
15+
project-template-esp32-s3.factory.yaml
16+
esphome-version: 2024.10.3
17+
combined-name: firmware
18+
release-summary: ${{ github.event.release.body }}
19+
release-url: ${{ github.event.release.html_url }}
20+
release-version: ${{ github.event.release.tag_name }}
21+
22+
upload-to-release:
23+
name: Upload to Release
24+
needs:
25+
- build-firmware
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Download Artifact
29+
uses: actions/[email protected]
30+
with:
31+
path: files
32+
- name: Copy files to output
33+
run: |-
34+
mkdir output
35+
version="${{ needs.build-firmware.outputs.version }}"
36+
pushd files
37+
for device in *; do
38+
pushd $device
39+
pushd $version
40+
cp manifest.json ../../../output/$device.manifest.json
41+
for bin in *.bin; do
42+
md5sum $bin | head -c 32 > ../../../output/$bin.md5
43+
cp $bin ../../../output/
44+
done
45+
popd
46+
popd
47+
done
48+
popd
49+
- name: Upload files to release
50+
uses: softprops/[email protected]
51+
with:
52+
files: output/*

.github/workflows/publish.yml

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)