Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--
From Core.yaml. Should match date YY.MM.DD.# ( Usually # is 1 )
-->
Version:

<!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## What does this implement/fix?



## Types of changes
<!--
What type of change does your PR introduce?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->

- [ ] Bugfix (fixed change that fixes an issue)
- [ ] New feature (thanks!)
- [ ] Breaking change (repair/feature that breaks existing functionality)
- [ ] Dependency Update - Does not publish
- [ ] Other - Does not publish
- [ ] Website of github readme file update - Does not publish
- [ ] Github workflows - Does not publish


## Checklist / Checklijst:
<!--
Put an x in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->

- [ ] The code change has been tested and works locally
- [ ] The code change has not yet been tested

If user-visible functionality or configuration variables are added/modified:
- [ ] Added/updated documentation for the web page

<!--
Thank you for contributing <3
-->
51 changes: 51 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name-template: 'Release v$NEXT_PATCH_VERSION'
tag-template: "$RESOLVED_VERSION"
change-template: "- #$NUMBER $TITLE @$AUTHOR"
sort-direction: ascending

categories:
- title: "🚨 Breaking changes"
labels:
- "breaking-change"
- title: "✨ New features"
labels:
- "new-feature"
- title: "🐛 Bug fixes"
labels:
- "bugfix"
# - title: "🚀 Enhancements"
# labels:
# - "enhancement"
# - "refactor"
# - "performance"
# - title: "🧰 Maintenance"
# labels:
# - "maintenance"
# - "ci"
# - title: "📚 Documentation"
# labels:
# - "documentation"
- title: "⬆️ Dependency updates"
collapse-after: 5
labels:
- "dependency-update"
# - title: "🚨🚨 Security Fixes 🚨🚨"
# labels:
# - "security"


include-labels:
- "bugfix"
- "new-feature"
- "breaking-change"

no-changes-template: '- No changes'

template: |
## What's Changed

$CHANGES

**Full Changelog**: https://github.com/ApolloAutomation/CAST_PRO-1/compare/$PREVIOUS_TAG...$RESOLVED_VERSION.1

Be sure to 🌟 this repository for updates!
9 changes: 5 additions & 4 deletions .github/workflows/autoassign.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Auto Assign

# pull_request_target (not pull_request) so auto-assign works on
# fork-submitted PRs; fork pull_request runs only get a read-only token.
# Safe because this workflow never checks out or executes PR code.
on:
issues:
types: [opened]
pull_request:
pull_request_target:
types: [opened]

permissions:
Expand All @@ -12,9 +15,7 @@ permissions:

jobs:
auto-assign:
# Skip auto-assign for pull requests from forks due to GITHUB_TOKEN permission restrictions
if: github.event_name == 'issues' || github.event.pull_request.head.repo.full_name == github.repository
uses: ApolloAutomation/Workflows/.github/workflows/autoassign.yml@main
with:
assignees: TrevorSchirmer
assignees: bharvey88
num-of-assignees: 1
108 changes: 108 additions & 0 deletions .github/workflows/build-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Build and Publish Beta

# Builds CAST_PRO-1 firmware from the beta branch and publishes it as assets on a
# rolling "beta" pre-release. The on-device "Firmware Channel" select points OTA
# updates at these assets. Stable firmware is built/published separately by
# build.yml (push to main -> GitHub Pages).
#
# NOTE: the unified firmware's Beta manifest is the manifest.json asset,
# which only exists once this workflow has run after the unified-firmware
# change. Merge to beta (or run this workflow manually) promptly after it
# lands on main — until then, devices switched to the Beta channel get a
# 404 on their update manifest.

on:
push:
branches: [beta]
paths:
- 'Integrations/ESPHome/**'
workflow_dispatch:

# Least privilege: read-only by default; only publish-beta is elevated to write.
permissions:
contents: read

jobs:
version:
name: Read version
runs-on: ubuntu-latest
outputs:
v: ${{ steps.read.outputs.v }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- id: read
run: |
v=$(awk '/substitutions:/ {f=1} f && /version:/ {print $2; exit}' \
Integrations/ESPHome/Core.yaml | tr -d '"')
echo "v=$v" >> "$GITHUB_OUTPUT"
echo "Beta version: $v"

build:
name: Build ${{ matrix.name }}
needs: version
strategy:
matrix:
include:
- { yaml: Integrations/ESPHome/CAST_PRO-1.yaml, name: firmware }
uses: esphome/workflows/.github/workflows/build.yml@9f6577fd37b5cf773ab1b9be929714a0dcd15661 # 2026.7.0
with:
files: ${{ matrix.yaml }}
esphome-version: stable
combined-name: ${{ matrix.name }}
release-version: ${{ needs.version.outputs.v }}

publish-beta:
name: Publish beta release assets
needs: [version, build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download firmware artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: fw
pattern: firmware*

- name: Ensure rolling 'beta-fw' pre-release exists
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release view beta-fw -R "${{ github.repository }}" >/dev/null 2>&1 \
|| gh release create beta-fw -R "${{ github.repository }}" \
--prerelease --title "Beta (rolling)" \
--notes "Latest CAST_PRO-1 beta firmware. Auto-updated on every push to the beta branch."

- name: Rewrite manifests to absolute URLs and upload assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BASE="https://github.com/${{ github.repository }}/releases/download/beta-fw"
man=$(find "fw/firmware" -name manifest.json | head -1)
if [ -z "$man" ]; then
echo "::error::manifest.json not found"
exit 1
fi
echo "Rewriting $man -> manifest.json"
# Make ota.path and parts[].path absolute release-asset URLs so the
# device never has to resolve a relative path against a redirected URL.
jq --arg base "$BASE" '
.builds[0].ota.path = ($base + "/" + (.builds[0].ota.path | sub(".*/"; "")))
| .builds[0].parts |= map(.path = ($base + "/" + (.path | sub(".*/"; ""))))
' "$man" > "manifest.json"
cat "manifest.json"
gh release upload beta-fw "manifest.json" -R "${{ github.repository }}" --clobber
find "fw/firmware" -name '*.bin' -print -exec \
gh release upload beta-fw {} -R "${{ github.repository }}" --clobber \;
echo "Beta assets published."

- name: Point beta-fw tag at the built commit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# gh release create tags default-branch HEAD, and uploads never move
# the tag, so without this the release's source commit drifts away
# from the assets actually published.
gh api -X PATCH "repos/${{ github.repository }}/git/refs/tags/beta-fw" \
-f sha="${{ github.sha }}" -F force=true
echo "beta-fw -> ${{ github.sha }}"
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
type: boolean
required: false
default: false
# release:
# types: [published]

jobs:
build-and-publish:
Expand All @@ -21,15 +23,16 @@ jobs:
id-token: write
pull-requests: write
with:
# TODO: Rename to this product's device name and YAML files
device-name: producttemplate
device-name: cast_pro-1
yaml-files: |
Integrations/ESPHome/AIR-1.yaml
firmware-names: ":firmware"
Integrations/ESPHome/CAST_PRO-1.yaml
# Maps CAST_PRO-1.yaml to the firmware/ output dir (the shared workflow's
# pattern key is everything after the last dash of the filename).
firmware-names: "1:firmware"
core-yaml-path: Integrations/ESPHome/Core.yaml
esphome-version: stable
# Bypass check if manually triggered with bypass option
check-yaml-changes: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.bypass-yaml-check == 'true') }}
publish-to-pages: true
has-installer: true
installer-path: static
installer-path: static
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@ on:
pull_request:

permissions:
pull-requests: write
issues: write
contents: read

# Label check lives in label-check.yml on pull_request_target so it can
# label fork-submitted PRs; plain pull_request tokens are read-only there.
jobs:
label-check:
name: Label Check
uses: ApolloAutomation/Workflows/.github/workflows/label-check.yml@main

ci:
name: CI
uses: ApolloAutomation/Workflows/.github/workflows/esphome-ci.yml@main
with:
# TODO: Rename to this product's YAML files
yaml-files: |
Integrations/ESPHome/AIR-1.yaml
Integrations/ESPHome/CAST_PRO-1.yaml
esphome-versions: |
stable
beta
dev
20 changes: 20 additions & 0 deletions .github/workflows/label-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Label Check

# pull_request_target (not pull_request) so the job gets a write token on
# fork-submitted PRs too; plain pull_request runs from forks are read-only
# and cannot add labels. Safe because the called workflow only reads the PR
# body and never checks out or executes PR code. The "edited" type re-runs
# the check when the template checkboxes are changed.
on:
pull_request_target:
types: [opened, edited, reopened, synchronize]

permissions:
pull-requests: write
issues: write
contents: read

jobs:
label-check:
name: Label Check
uses: ApolloAutomation/Workflows/.github/workflows/label-check.yml@main
7 changes: 5 additions & 2 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
name: Weekly Build
uses: ApolloAutomation/Workflows/.github/workflows/esphome-ci.yml@main
with:
# TODO: Rename to this product's YAML files
yaml-files: |
Integrations/ESPHome/AIR-1.yaml
Integrations/ESPHome/CAST_PRO-1.yaml
# dev excluded until the TemplateSelect .state incompatibility is fixed
esphome-versions: |
stable
beta
6 changes: 6 additions & 0 deletions Integrations/ESPHome/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Gitignore settings for ESPHome
# This is an example and may include too much for your use-case.
# You can modify this file to suit your needs.
/.esphome/
/secrets.yaml
__pycache__/
53 changes: 0 additions & 53 deletions Integrations/ESPHome/AIR-1.yaml

This file was deleted.

Loading
Loading