File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1+ FROM conanio/gcc8
2+
3+ LABEL "com.github.actions.name" ="conan-upload"
4+ LABEL "com.github.actions.description" ="Uploads a Conan package"
5+
6+ LABEL "maintainer" ="Dmitry Arkhipov <grisumbras@gmail.com>"
7+
8+ USER root
9+ ADD entrypoint.sh /entrypoint.sh
10+ ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 1+ #! /bin/sh -l
2+
3+ eval " $( pyenv init -) "
4+ eval " $( pyenv virtualenv-init -) "
5+ conan user -p $CONAN_PASSWORD -r upload_repo $CONAN_LOGIN_USERNAME
6+
7+ PACKAGE_NAME=$( conan inspect . -a name | cut -d\ -f2)
8+ PACKAGE_VERSION=$( conan inspect . -a version | cut -d\ -f2)
9+ CONAN_REFERENCE=$PACKAGE_NAME /$PACKAGE_VERSION
10+
11+ conan upload -r upload_repo -c $CONAN_REFERENCE
Original file line number Diff line number Diff line change 11workflow "CI" {
22 on = " push"
3- resolves = " build "
3+ resolves = " publish "
44}
55
66
@@ -24,3 +24,16 @@ action "build" {
2424 CONAN_USERNAME = " grisumbras"
2525 }
2626}
27+
28+
29+ action "filter-ref" {
30+ needs = " build"
31+ uses = " actions/bin/filter@master"
32+ args = " branch master || tag"
33+ }
34+
35+ action "publish" {
36+ uses = " ./.github/conan-upload/"
37+ needs = " filter-ref"
38+ secrets = [" CONAN_LOGIN_USERNAME" , " CONAN_PASSWORD" ]
39+ }
You can’t perform that action at this time.
0 commit comments