Upload component to ESP-IDF component registry #31
Workflow file for this run
This file contains 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
# Copyright © SixtyFPS GmbH <[email protected]> | |
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 | |
name: Upload component to ESP-IDF component registry | |
on: | |
workflow_dispatch: | |
inputs: | |
release: | |
type: boolean | |
default: false | |
required: false | |
description: "Release? Uploads to esp-idf component registry if true" | |
jobs: | |
upload_components: | |
runs-on: ubuntu-22.04 | |
container: espressif/idf:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Remove use of nightly version | |
if: github.event.inputs.release == 'true' | |
working-directory: api/cpp/esp-idf/slint | |
run: | |
if grep -q 'set(SLINT_USE_NIGHTLY_VERSION TRUE)' CMakeLists.txt; then | |
sed -i '/set(SLINT_USE_NIGHTLY_VERSION TRUE)/d' CMakeLists.txt | |
else | |
echo "SLINT_USE_NIGHTLY_VERSION marker is missing in CMakeLists.txt. Did you forget to change this script?" | |
exit 1 | |
fi | |
- name: Upload component | |
if: github.event.inputs.release == 'true' | |
uses: espressif/upload-components-ci-action@v1 | |
with: | |
name: "slint" | |
namespace: "slint" | |
api_token: ${{ secrets.ESP_IDF_COMPONENTS_TOKEN }} | |
directories: "api/cpp/esp-idf/slint" | |
- name: Package component | |
if: github.event.inputs.release != 'true' | |
working-directory: "api/cpp/esp-idf/slint" | |
run: | | |
. ${IDF_PATH}/export.sh | |
compote component pack --name slint | |
- name: Archive component | |
if: github.event.inputs.release != 'true' | |
uses: actions/upload-artifact@v4 | |
with: | |
path: "api/cpp/esp-idf/slint/dist/*" | |