Skip to content

Commit f6ac595

Browse files
authored
fix(ci): Ensure upload of components happens on release (#420)
* fix(ci): Ensure upload of components happens on release * fix version getting when on PR * read the error message this time * update step name * final upload * use tag name from release
1 parent fa9e215 commit f6ac595

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/upload_components.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,17 @@ on:
44
# i.e. validate that the component passes all checks for being uploaded.
55
pull_request:
66

7-
push:
8-
branches:
9-
- main
10-
tags:
11-
# only upload components on tagged commits
12-
- v*
7+
release:
8+
types: [published]
9+
1310
jobs:
1411
upload_components:
1512
runs-on: ubuntu-latest
1613
steps:
1714
- uses: actions/checkout@v4
1815
with:
1916
submodules: "recursive"
20-
- name: Upload component to the component registry
17+
- name: Upload components to the component registry
2118
uses: espressif/upload-components-ci-action@v2
2219
with:
2320
# Please try to keep the directories list sorted.
@@ -112,5 +109,7 @@ jobs:
112109
components/wifi
113110
components/wrover-kit
114111
namespace: "espp"
112+
# use old version if this isn't a release for testing
113+
version: ${{ github.event.release && github.event.release.tag_name || 'v0.20.2' }}
115114
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
116-
dry_run: ${{ github.ref_name != 'main' || github.repository_owner != 'esp-cpp' || ! (github.event.release && github.event.action == 'published') }}
115+
dry_run: ${{ github.ref_name != 'main' || github.repository_owner != 'esp-cpp' }}

0 commit comments

Comments
 (0)