Skip to content
Open
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
5 changes: 5 additions & 0 deletions .github/scripts/on-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,11 @@ pushd "$OUTPUT_DIR" >/dev/null
tar -cJf "$LIBS_XZ" "esp32-arduino-libs"
popd >/dev/null

# Copy esp-hosted binaries

mkdir -p "$GITHUB_WORKSPACE/hosted"
cp "$OUTPUT_DIR/esp32-arduino-libs/hosted"/*.bin "$GITHUB_WORKSPACE/hosted/"

# Upload ZIP and XZ libs to release page

echo "Uploading ZIP libs to release page ..."
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,45 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.TOOLS_UPLOAD_PAT }}
run: bash ./.github/scripts/on-release.sh

- name: Upload hosted binaries
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: hosted
if-no-files-found: ignore
path: ${{ github.workspace }}/hosted

upload-hosted-binaries:
name: Upload hosted binaries
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: gh-pages

- name: Download hosted binaries
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
name: hosted
path: ${{ github.workspace }}/hosted-latest

- name: Copy hosted binaries to proper directory and commit
env:
GITHUB_TOKEN: ${{ secrets.TOOLS_UPLOAD_PAT }}
run: |
# Create hosted directory if it doesn't exist
mkdir -p ${{ github.workspace }}/hosted

# Copy hosted binaries to proper directory without overwriting existing files
cp -n ${{ github.workspace }}/hosted-latest/*.bin ${{ github.workspace }}/hosted/

# Commit the changes
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add hosted/*.bin
if ! git diff --cached --quiet; then
git commit -m "Add new esp-hosted slave binaries"
git push origin HEAD:gh-pages
fi