From 9cf3c2dd62af2bc13852947542df0254bcc05482 Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 28 Feb 2023 13:53:14 +0100 Subject: [PATCH] allow latest removal to fail --- .github/workflows/conan-package.yml | 12 +++++++----- .github/workflows/conan-recipe-export.yml | 18 ++++++++++++------ 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index b5465fdb03..d3d75610ee 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -126,13 +126,15 @@ jobs: run: conan create . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} --build=missing --update -o ${{ needs.conan-recipe-version.outputs.project_name }}:devtools=True - name: Remove the latest alias - if: ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }} - run: | - conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f - conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f + if: always() && ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }} + run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f + + - name: Remove the latest alias from cura-ce + if: always() && ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }} + run: conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f - name: Create the latest alias - if: ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' && always() }} + if: always() && ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }} run: conan alias ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - name: Upload the Package(s) diff --git a/.github/workflows/conan-recipe-export.yml b/.github/workflows/conan-recipe-export.yml index d0e74498d3..483fc9154a 100644 --- a/.github/workflows/conan-recipe-export.yml +++ b/.github/workflows/conan-recipe-export.yml @@ -89,13 +89,19 @@ jobs: run: conan export . ${{ inputs.recipe_id_full }} - name: Remove the latest alias - if: ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }} - run: | - conan remove ${{ inputs.recipe_id_latest }} -r cura -f - conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f + if: always() && ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }} + run: conan remove ${{ inputs.recipe_id_latest }} -r cura -f + + - name: Remove the latest alias from cura-ce + if: always() && ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }} + run: conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f - name: Create the latest alias - if: ${{ inputs.recipe_id_latest != '' && always() }} + if: always() && ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }} + run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }} + + - name: Create the latest alias + if: always() && ${{ inputs.recipe_id_latest != '' }} run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }} - name: Upload the Package(s) @@ -103,5 +109,5 @@ jobs: run: conan upload "*" -r cura --all -c - name: Upload the Package(s) community - if: ${{ always() && inputs.conan_upload_community == true }} + if: always() && ${{ inputs.conan_upload_community == true }} run: conan upload "*" -r cura-ce -c