Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v') || inputs.release
permissions:
contents: write
concurrency:
group: release-publish
cancel-in-progress: false

steps:
- name: Download all artifacts
Expand All @@ -88,6 +91,9 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: release-publish
cancel-in-progress: false
Comment thread
swoboda1337 marked this conversation as resolved.
strategy:
matrix:
target:
Expand Down Expand Up @@ -162,6 +168,9 @@ jobs:
contents: read
pages: write
id-token: write
concurrency:
group: pages-deploy
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
53 changes: 37 additions & 16 deletions .github/workflows/check-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,47 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Get latest ESP-Hosted version
id: latest
run: |
VERSION=$(curl -s "https://components.espressif.com/api/components/espressif/esp_hosted" | jq -r '.versions[0].version')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Latest ESP-Hosted version: $VERSION"

- name: Get latest release version
id: current
- name: Determine versions to build
id: todo
env:
GH_TOKEN: ${{ github.token }}
run: |
Comment thread
swoboda1337 marked this conversation as resolved.
VERSION=$(gh release view --repo ${{ github.repository }} --json tagName -q '.tagName' 2>/dev/null | sed 's/^v//' || echo "none")
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Current release version: $VERSION"
# Stable versions from the ESP component registry (exclude pre-releases)
AVAILABLE=$(curl -s "https://components.espressif.com/api/components/espressif/esp_hosted" \
| jq -r '.versions[].version' \
| grep -viE 'rc|alpha|beta|dev')
Comment thread
swoboda1337 marked this conversation as resolved.
Outdated
Comment thread
swoboda1337 marked this conversation as resolved.
Outdated

# Versions already released (strip leading v, skip manifest tag)
RELEASED=$(gh release list --repo "${{ github.repository }}" --limit 200 \
--json tagName -q '.[].tagName' \
| grep -v '^manifest$' \
| sed 's/^v//')

# Versions available but not yet released, sorted oldest-first
MISSING=$(grep -Fxv -f <(echo "$RELEASED") <<< "$AVAILABLE" | sort -V || true)

echo "Available stable versions:"
echo "$AVAILABLE"
echo "Already released:"
echo "$RELEASED"
echo "Missing versions to build:"
echo "$MISSING"

{
echo "missing<<EOF"
echo "$MISSING"
echo "EOF"
} >> "$GITHUB_OUTPUT"

- name: Trigger build if new version
if: steps.latest.outputs.version != steps.current.outputs.version
- name: Dispatch build for each missing version
if: steps.todo.outputs.missing != ''
env:
Comment thread
swoboda1337 marked this conversation as resolved.
GH_TOKEN: ${{ github.token }}
Comment thread
swoboda1337 marked this conversation as resolved.
run: |
echo "New version available: ${{ steps.latest.outputs.version }}"
gh workflow run build.yml --repo ${{ github.repository }} -f version=${{ steps.latest.outputs.version }} -f release=true
while IFS= read -r V; do
[ -z "$V" ] && continue
echo "Dispatching build for $V"
gh workflow run build.yml --repo "${{ github.repository }}" \
-f version="$V" -f release=true
sleep 5
done <<< "${{ steps.todo.outputs.missing }}"
Loading