Add npmpackage recipe for Conan #83
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
name: conan-package-export | |
on: | |
push: | |
paths: | |
- 'recipes/**' | |
- '.github/workflows/conan-package.yml' | |
branches: | |
- main | |
- 'CURA-*' | |
- 'PP-*' | |
- 'NP-*' | |
workflow_dispatch: | |
inputs: | |
recipes: | |
description: 'Path to the recipes to be exported, e.g. "recipes/clipper/all/conanfile.py recipes/sentrylibrary/all/conanfile.py". Leave empty to export all the recipes.' | |
default: '' | |
type: string | |
permissions: | |
contents: read | |
jobs: | |
conan-package-export: | |
name: Conan Package Export | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup the build environment | |
uses: ultimaker/cura-workflows/.github/actions/setup-build-environment@main | |
with: | |
conan_user: ${{ secrets.CONAN_USER }} | |
conan_password: ${{ secrets.CONAN_PASS }} | |
- uses: greguintow/get-diff-action@v7 | |
id: get-diff | |
if: ${{ github.event_name == 'push' }} | |
with: | |
PATTERNS: | | |
recipes/**/*.* | |
- name: Get recipes list | |
id: get-recipes-list | |
run: | | |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | |
recipes_list="${{ inputs.recipes }}" | |
else | |
recipes_list="${{ env.GIT_DIFF_FILTERED }}" | |
fi | |
if [ -z "$recipes_list" ]; then | |
recipes_list=$(find . -mindepth 4 -maxdepth 4 -iname "conanfile.py" -print0 | xargs -0 echo) | |
fi | |
echo "recipes_list=$recipes_list" >> $GITHUB_OUTPUT | |
- name: Export changed recipes | |
run: | | |
python Cura-workflows/runner_scripts/upload_conan_recipes.py --user ultimaker --branch ${{ github.ref_name }} --remote cura-conan2 ${{ steps.get-recipes-list.outputs.recipes_list }} |