Skip to content

Commit 00605a9

Browse files
committed
ci(hosted): Copy esp-hosted binaries to gh-pages
1 parent fc8ce8f commit 00605a9

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/scripts/on-release.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,11 @@ pushd "$OUTPUT_DIR" >/dev/null
391391
tar -cJf "$LIBS_XZ" "esp32-arduino-libs"
392392
popd >/dev/null
393393

394+
# Copy esp-hosted binaries
395+
396+
mkdir -p "$GITHUB_WORKSPACE/hosted"
397+
cp "$OUTPUT_DIR/esp32-arduino-libs/hosted"/*.bin "$GITHUB_WORKSPACE/hosted/"
398+
394399
# Upload ZIP and XZ libs to release page
395400

396401
echo "Uploading ZIP libs to release page ..."

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,45 @@ jobs:
3636
env:
3737
GITHUB_TOKEN: ${{ secrets.TOOLS_UPLOAD_PAT }}
3838
run: bash ./.github/scripts/on-release.sh
39+
40+
- name: Upload hosted binaries
41+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
42+
with:
43+
name: hosted
44+
if-no-files-found: ignore
45+
path: ${{ github.workspace }}/hosted
46+
47+
upload-hosted-binaries:
48+
name: Upload hosted binaries
49+
needs: build
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Checkout gh-pages branch
53+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
54+
with:
55+
ref: gh-pages
56+
57+
- name: Download hosted binaries
58+
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
59+
with:
60+
name: hosted
61+
path: ${{ github.workspace }}/hosted-latest
62+
63+
- name: Copy hosted binaries to proper directory and commit
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.TOOLS_UPLOAD_PAT }}
66+
run: |
67+
# Create hosted directory if it doesn't exist
68+
mkdir -p ${{ github.workspace }}/hosted
69+
70+
# Copy hosted binaries to proper directory without overwriting existing files
71+
cp -n ${{ github.workspace }}/hosted-latest/*.bin ${{ github.workspace }}/hosted/
72+
73+
# Commit the changes
74+
git config user.name "github-actions[bot]"
75+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
76+
git add hosted/*.bin
77+
if ! git diff --cached --quiet; then
78+
git commit -m "Add new esp-hosted slave binaries"
79+
git push origin HEAD:gh-pages
80+
fi

0 commit comments

Comments
 (0)