mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 05:53:59 -06:00
Merge branch 'main' into PR-13661
This commit is contained in:
commit
15f31a7c0c
16 changed files with 129 additions and 131 deletions
16
.github/workflows/conan-package-create.yml
vendored
16
.github/workflows/conan-package-create.yml
vendored
|
@ -3,6 +3,14 @@ name: Create and Upload Conan package
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
project_name:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
build_id:
|
||||
required: true
|
||||
type: number
|
||||
|
||||
recipe_id_full:
|
||||
required: true
|
||||
type: string
|
||||
|
@ -128,7 +136,13 @@ jobs:
|
|||
|
||||
- name: Create the Packages
|
||||
if: ${{ !inputs.create_from_source }}
|
||||
run: conan install ${{ inputs.recipe_id_full }} --build=missing --update
|
||||
run: |
|
||||
conan_build_info --v2 start ${{ inputs.project_name }} ${{ github.run_number }}000${{ inputs.build_id }}
|
||||
conan lock create --reference ${{ inputs.recipe_id_full }} --build=missing --update
|
||||
conan install ${{ inputs.recipe_id_full }} --build=missing --update --lockfile=conan.lock
|
||||
conan_build_info --v2 create buildinfo.json --lockfile conan.lock --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }}
|
||||
conan_build_info --v2 publish buildinfo.json --url https://ultimaker.jfrog.io/artifactory --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }}
|
||||
conan_build_info --v2 stop
|
||||
|
||||
- name: Create the Packages (from source)
|
||||
if: ${{ inputs.create_from_source }}
|
||||
|
|
2
.github/workflows/conan-package.yml
vendored
2
.github/workflows/conan-package.yml
vendored
|
@ -81,6 +81,8 @@ jobs:
|
|||
|
||||
uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main
|
||||
with:
|
||||
project_name: cura
|
||||
build_id: 1
|
||||
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
|
||||
runs_on: 'ubuntu-20.04'
|
||||
python_version: '3.10.x'
|
||||
|
|
16
.github/workflows/conan-recipe-version.yml
vendored
16
.github/workflows/conan-recipe-version.yml
vendored
|
@ -93,12 +93,13 @@ jobs:
|
|||
issue_number = "${{ github.ref }}".split('/')[2]
|
||||
is_tag = "${{ github.ref_type }}" == "tag"
|
||||
is_release_branch = False
|
||||
ref_name = "${{ github.base_ref }}" if event_name == "pull_request" else "${{ github.ref_name }}"
|
||||
buildmetadata = "" if "${{ inputs.additional_buildmetadata }}" == "" else "${{ inputs.additional_buildmetadata }}_"
|
||||
|
||||
# FIXME: for when we push a tag (such as an release)
|
||||
channel = "testing"
|
||||
if is_tag:
|
||||
branch_version = tools.Version("${{ github.ref_name }}")
|
||||
branch_version = tools.Version(ref_name)
|
||||
is_release_branch = True
|
||||
channel = "_"
|
||||
user = "_"
|
||||
|
@ -108,10 +109,10 @@ jobs:
|
|||
branch_version = tools.Version(repo.active_branch.name)
|
||||
except ConanException:
|
||||
branch_version = tools.Version('0.0.0')
|
||||
if "${{ github.ref_name }}" == f"{branch_version.major}.{branch_version.minor}":
|
||||
if ref_name == f"{branch_version.major}.{branch_version.minor}":
|
||||
channel = 'stable'
|
||||
is_release_branch = True
|
||||
elif "${{ github.ref_name }}" in ("main", "master"):
|
||||
elif ref_name in ("main", "master"):
|
||||
channel = 'testing'
|
||||
else:
|
||||
channel = repo.active_branch.name.split("_")[0].replace("-", "_").lower()
|
||||
|
@ -165,15 +166,6 @@ jobs:
|
|||
bump_up_minor = int(latest_branch_version.minor) + 1
|
||||
reset_patch = 0
|
||||
actual_version = f"{latest_branch_version.major}.{bump_up_minor}.{reset_patch}-alpha+{buildmetadata}{channel_metadata}"
|
||||
else:
|
||||
# FIXME: for external PR's
|
||||
actual_version = f"5.3.0-alpha+{buildmetadata}pr_{issue_number}"
|
||||
|
||||
if is_tag and "${{ github.ref_name }}" == "5.2.0-beta":
|
||||
actual_version = "5.2.0-beta"
|
||||
is_release_branch = True
|
||||
user = "_"
|
||||
channel = "_"
|
||||
|
||||
# %% print to output
|
||||
cmd_name = ["echo", f"::set-output name=name::{project_name}"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue