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
12 changes: 9 additions & 3 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Documentation Build and Production Deploy CI

on:
release:
types: [published]
workflow_run:
workflows: ["ESP32 Arduino Release"]
types:
- completed
push:
branches:
- release/v2.x
Expand All @@ -12,14 +14,18 @@ on:
- '.github/workflows/docs_deploy.yml'

jobs:

deploy-prod-docs:
name: Deploy Documentation on Production
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- name: Check if release workflow is successful
if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion != 'success' }}
run: |
echo "Release workflow failed. Exiting..."
exit 1
- uses: actions/checkout@v4
with:
submodules: true
Expand Down
31 changes: 27 additions & 4 deletions .github/workflows/upload-idf-component.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
name: Push components to https://components.espressif.com

on:
push:
tags:
- '*'
workflow_run:
workflows: ["ESP32 Arduino Release"]
types:
- completed

jobs:
upload_components:
runs-on: ubuntu-latest
steps:
- name: Get the release tag
run: |
if [ "${{ github.event.workflow_run.conclusion }}" != "success" ]; then
echo "Release workflow failed. Exiting..."
exit 1
fi

branch=${{ github.event.workflow_run.head_branch }}
if [[ $branch == refs/tags/* ]]; then
tag="${branch#refs/tags/}"
elif [[ $branch =~ ^[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
tag=$branch
else
echo "Tag not found in $branch. Exiting..."
exit 1
fi

echo "Tag: $tag"
echo "RELEASE_TAG=$tag" >> $GITHUB_ENV

- uses: actions/checkout@v4
with:
submodules: "recursive"
Expand All @@ -15,6 +38,6 @@ jobs:
uses: espressif/upload-components-ci-action@v1
with:
name: arduino-esp32
version: ${{ github.ref_name }}
version: ${{ env.RELEASE_TAG }}
namespace: espressif
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}