File tree Expand file tree Collapse file tree 2 files changed +36
-7
lines changed Expand file tree Collapse file tree 2 files changed +36
-7
lines changed Original file line number Diff line number Diff line change 11name : Documentation Build and Production Deploy CI
22
33on :
4- release :
5- types : [published]
4+ workflow_run :
5+ workflows : ["ESP32 Arduino Release"]
6+ types :
7+ - completed
68 push :
79 branches :
810 - release/v2.x
1214 - ' .github/workflows/docs_deploy.yml'
1315
1416jobs :
15-
1617 deploy-prod-docs :
1718 name : Deploy Documentation on Production
1819 runs-on : ubuntu-22.04
1920 defaults :
2021 run :
2122 shell : bash
2223 steps :
24+ - name : Check if release workflow is successful
25+ if : ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion != 'success' }}
26+ run : |
27+ echo "Release workflow failed. Exiting..."
28+ exit 1
2329 - uses : actions/checkout@v4
2430 with :
2531 submodules : true
Original file line number Diff line number Diff line change 11name : Push components to https://components.espressif.com
2+
23on :
3- push :
4- tags :
5- - ' *'
4+ workflow_run :
5+ workflows : ["ESP32 Arduino Release"]
6+ types :
7+ - completed
8+
69jobs :
710 upload_components :
811 runs-on : ubuntu-latest
912 steps :
13+ - name : Get the release tag
14+ run : |
15+ if [ "${{ github.event.workflow_run.conclusion }}" != "success" ]; then
16+ echo "Release workflow failed. Exiting..."
17+ exit 1
18+ fi
19+
20+ branch=${{ github.event.workflow_run.head_branch }}
21+ if [[ $branch == refs/tags/* ]]; then
22+ tag="${branch#refs/tags/}"
23+ elif [[ $branch =~ ^[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
24+ tag=$branch
25+ else
26+ echo "Tag not found in $branch. Exiting..."
27+ exit 1
28+ fi
29+
30+ echo "Tag: $tag"
31+ echo "RELEASE_TAG=$tag" >> $GITHUB_ENV
32+
1033 - uses : actions/checkout@v4
1134 with :
1235 submodules : " recursive"
1538 uses : espressif/upload-components-ci-action@v1
1639 with :
1740 name : arduino-esp32
18- version : ${{ github.ref_name }}
41+ version : ${{ env.RELEASE_TAG }}
1942 namespace : espressif
2043 api_token : ${{ secrets.IDF_COMPONENT_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments