File tree 2 files changed +36
-7
lines changed
2 files changed +36
-7
lines changed Original file line number Diff line number Diff line change 1
1
name : Documentation Build and Production Deploy CI
2
2
3
3
on :
4
- release :
5
- types : [published]
4
+ workflow_run :
5
+ workflows : ["ESP32 Arduino Release"]
6
+ types :
7
+ - completed
6
8
push :
7
9
branches :
8
10
- release/v2.x
12
14
- ' .github/workflows/docs_deploy.yml'
13
15
14
16
jobs :
15
-
16
17
deploy-prod-docs :
17
18
name : Deploy Documentation on Production
18
19
runs-on : ubuntu-22.04
19
20
defaults :
20
21
run :
21
22
shell : bash
22
23
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
23
29
- uses : actions/checkout@v4
24
30
with :
25
31
submodules : true
Original file line number Diff line number Diff line change 1
1
name : Push components to https://components.espressif.com
2
+
2
3
on :
3
- push :
4
- tags :
5
- - ' *'
4
+ workflow_run :
5
+ workflows : ["ESP32 Arduino Release"]
6
+ types :
7
+ - completed
8
+
6
9
jobs :
7
10
upload_components :
8
11
runs-on : ubuntu-latest
9
12
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
+
10
33
- uses : actions/checkout@v4
11
34
with :
12
35
submodules : " recursive"
15
38
uses : espressif/upload-components-ci-action@v1
16
39
with :
17
40
name : arduino-esp32
18
- version : ${{ github.ref_name }}
41
+ version : ${{ env.RELEASE_TAG }}
19
42
namespace : espressif
20
43
api_token : ${{ secrets.IDF_COMPONENT_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments