Arduino Release v3.3.4 based on ESP-IDF v5.5.1+ #81
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ESP32 Arduino Release | |
| on: | |
| release: | |
| types: published | |
| permissions: | |
| contents: write | |
| pages: write | |
| jobs: | |
| build: | |
| name: Publish Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| token: ${{ secrets.TOOLS_UPLOAD_PAT }} | |
| ref: ${{ github.event.release.target_commitish }} | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.0.4 | |
| with: | |
| python-version: "3.x" | |
| - name: Install packaging | |
| run: pip install packaging | |
| - name: Install pyserial | |
| run: pip install pyserial | |
| - name: Build Release | |
| 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 |