diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index 6fbf90bf6..98ca25f35 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -1,57 +1,34 @@ ---- name: conan-package -# Exports the recipe, sources and binaries for Mac, Windows and Linux and upload these to the server such that these can -# be used downstream. -# -# It should run on pushes against main or CURA-* branches, but it will only create the binaries for main and release branches - on: - workflow_dispatch: - push: - paths: - - '*.xml.*' - - '*.sig' - - 'conanfile.py' - - '.github/workflows/conan-package.yml' - - '.github/workflows/requirements*.txt' - branches: - - main - - master - - 'CURA-*' - - '[0-9].[0-9]*' - tags: - - '[1-9]+.[0-9]+.[0-9]*' - - '[1-9]+.[0-9]+.[0-9]' + workflow_dispatch: + push: + paths: + - '*.xml.*' + - '*.sig' + - 'conanfile.py' + - '.github/workflows/conan-package.yml' + - '.github/workflows/requirements*.txt' + branches: + - main + - master + - 'PP-*' + - 'CURA-*' + - '[0-9].[0-9]*' + tags: + - '[0-9]+.[0-9]+.[0-9]*' + - '[0-9]+.[0-9]+.[0-9]' jobs: - conan-recipe-version: - uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main - with: - project_name: fdm_materials - - conan-package-export-linux: - needs: [ conan-recipe-version ] - uses: ultimaker/cura/.github/workflows/conan-recipe-export.yml@main - with: - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} - runs_on: 'ubuntu-20.04' - python_version: '3.10.x' - conan_config_branch: 'master' - conan_logging_level: 'info' - conan_export_binaries: true - secrets: inherit - - notify-export: - if: ${{ always() }} - needs: [ conan-recipe-version, conan-package-export-linux ] + conan-recipe-version: + uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@main + with: + project_name: fdm_materials - uses: ultimaker/cura/.github/workflows/notify.yml@main - with: - success: ${{ contains(join(needs.*.result, ','), 'success') }} - success_title: "New Conan recipe exported in ${{ github.repository }}" - success_body: "Exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" - failure_title: "Failed to export Conan Export in ${{ github.repository }}" - failure_body: "Failed to exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" - secrets: inherit + conan-package-export-linux: + needs: [ conan-recipe-version ] + uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-export.yml@main + with: + recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} + recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} + secrets: inherit diff --git a/.github/workflows/process-pull-request.yml b/.github/workflows/process-pull-request.yml index 56fb015b9..45b3f8c91 100644 --- a/.github/workflows/process-pull-request.yml +++ b/.github/workflows/process-pull-request.yml @@ -1,15 +1,10 @@ name: process-pull-request on: - pull_request_target: - types: [opened, reopened, edited, synchronize, review_requested, ready_for_review, assigned] + pull_request_target: + types: [ opened, reopened, edited, review_requested, ready_for_review, assigned ] jobs: - add_label: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-ecosystem/action-add-labels@v1 - if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} - with: - labels: 'PR: Community Contribution :crown:' + add_label: + uses: ultimaker/cura-workflows/.github/workflows/process-pull-request.yml@main + secrets: inherit \ No newline at end of file diff --git a/conandata.yml b/conandata.yml new file mode 100644 index 000000000..fa35d3cda --- /dev/null +++ b/conandata.yml @@ -0,0 +1 @@ +version: "5.7.0-alpha.0" \ No newline at end of file diff --git a/conanfile.py b/conanfile.py index f35d2c142..76cb6cf86 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,7 +1,7 @@ import os from conan import ConanFile -from conan.tools.files import copy +from conan.tools.files import copy, update_conandata from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration @@ -22,7 +22,10 @@ class FDM_MaterialsConan(ConanFile): def set_version(self): if not self.version: - self.version = "5.6.0-beta.1" + self.version = self.conan_data["version"] + + def export(self): + update_conandata(self, {"version": self.version}) def export_sources(self): copy(self, "*.fdm_material", self.recipe_folder, self.export_sources_folder)