Skip to content

Commit d2eb15a

Browse files
committed
[changed] version of conan package set in env variable, can be used toset the version in pipeline with git tag
1 parent 7ddc170 commit d2eb15a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/publish-package.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ jobs:
4646
- name: Create Conan package
4747
run: |
4848
conan profile detect --force
49-
conan create . --version=${{ steps.vars.outputs.version }} --user=${{ github.actor }} --channel=stable
49+
conan create . --user=${{ github.repository_owner }} --channel=stable
50+
env:
51+
CONAN_REF_VERSION: ${{ steps.vars.outputs.version }}
5052

5153
- name: Upload Conan package
5254
run: |

conanfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import os
12
from conan import ConanFile
23
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
34

45

56
class EmbeddedLibRecipe(ConanFile):
67
name = "embeddedlib"
7-
version = "0.1.0"
8+
version = os.getenv("CONAN_REF_VERSION", "0.0.0")
89
package_type = "library"
910

1011
# Optional metadata

0 commit comments

Comments
 (0)