Skip to content

Commit

Permalink
Upload binaries to gh release (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz authored Nov 17, 2024
1 parent 0ad2e20 commit 9449993
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 88 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
- name: Checkout source code
uses: actions/[email protected]
- name: ESPHome ${{ matrix.esphome-version }}
uses: esphome/[email protected].1
uses: esphome/[email protected].3
with:
yaml-file: ${{ matrix.file }}.yaml
version: ${{ matrix.esphome-version }}
- name: ESPHome ${{ matrix.esphome-version }} Factory
uses: esphome/[email protected].1
uses: esphome/[email protected].3
with:
yaml-file: ${{ matrix.file }}.factory.yaml
version: ${{ matrix.esphome-version }}
52 changes: 52 additions & 0 deletions .github/workflows/publish-firmware.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish Firmware

on:
release:
types: [published]

jobs:
build-firmware:
name: Build Firmware
uses: esphome/workflows/.github/workflows/[email protected]
with:
files: |
project-template-esp32.factory.yaml
project-template-esp32-c3.factory.yaml
project-template-esp32-s3.factory.yaml
esphome-version: 2024.10.3
combined-name: firmware
release-summary: ${{ github.event.release.body }}
release-url: ${{ github.event.release.html_url }}
release-version: ${{ github.event.release.tag_name }}

upload-to-release:
name: Upload to Release
needs:
- build-firmware
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/[email protected]
with:
path: files
- name: Copy files to output
run: |-
mkdir output
version="${{ needs.build-firmware.outputs.version }}"
pushd files
for device in *; do
pushd $device
pushd $version
cp manifest.json ../../../output/$device.manifest.json
for bin in *.bin; do
md5sum $bin | head -c 32 > ../../../output/$bin.md5
cp $bin ../../../output/
done
popd
popd
done
popd
- name: Upload files to release
uses: softprops/[email protected]
with:
files: output/*
86 changes: 0 additions & 86 deletions .github/workflows/publish.yml

This file was deleted.

0 comments on commit 9449993

Please sign in to comment.