--- /dev/null
+version: 2
+
+jobs:
+
+ build-test:
+ docker:
+ - image: mcr.microsoft.com/dotnet/core/sdk:3.0
+ steps:
+ - checkout
+ - run: curl -sL https://art.sec.samsung.net/artifactory/tools/CircleCI/scripts/set_proxy_setting.sh | sh
+ - run: ./build.sh build
+
+
+ build-nightly:
+ docker:
+ - image: mcr.microsoft.com/dotnet/core/sdk:3.0
+ steps:
+ - checkout
+ - run: curl -sL https://art.sec.samsung.net/artifactory/tools/CircleCI/scripts/set_proxy_setting.sh | sh
+ - run:
+ command: |
+ VERSION=$(./build.sh version nightly)
+ echo ${VERSION} > version.txt
+ ./build.sh build
+ ./build.sh pack ${VERSION}
+ - persist_to_workspace:
+ root: .
+ paths:
+ - XSF.*.nupkg
+ - version.txt
+
+ build-release:
+ docker:
+ - image: mcr.microsoft.com/dotnet/core/sdk:3.0
+ steps:
+ - checkout
+ - run: curl -sL https://art.sec.samsung.net/artifactory/tools/CircleCI/scripts/set_proxy_setting.sh | sh
+ - run:
+ command: |
+ VERSION=$(echo ${CIRCLE_TAG} | sed -e "s/^v//")
+ echo ${VERSION} > version.txt
+ ./build.sh build
+ ./build.sh pack ${VERSION}
+ - persist_to_workspace:
+ root: .
+ paths:
+ - XSF.*.nupkg
+ - version.txt
+
+ deploy:
+ docker:
+ - image: mcr.microsoft.com/dotnet/core/sdk:3.0
+ environment:
+ ART_NUGET_SOURCE: https://art.sec.samsung.net/artifactory/api/nuget/dotnet_nuget
+ steps:
+ - attach_workspace:
+ at: .
+ - run: dotnet nuget push -s ${ART_NUGET_SOURCE} -k ${ART_NUGET_APIKEY} XSF.*.nupkg
+
+ github-release:
+ docker:
+ - image: cibuilds/github:0.10
+ environment:
+ GITHUB_API: https://github.sec.samsung.net/api/v3/
+ steps:
+ - attach_workspace:
+ at: .
+ - run:
+ command: |
+ VERSION=$(cat version.txt)
+ ghr -t ${GITHUB_TOKEN} -u dotnet -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace ${VERSION} *.nupkg
+
+
+workflows:
+ version: 2
+
+ commit:
+ jobs:
+ - build-test
+
+ nightly:
+ triggers:
+ - schedule:
+ cron: "0 15 * * *"
+ filters:
+ branches:
+ only:
+ - master
+ jobs:
+ - build-nightly
+ - deploy:
+ requires:
+ - build-nightly
+
+ release:
+ jobs:
+ - build-release:
+ filters:
+ tags:
+ only: /^v[0-9]+.*/
+ branches:
+ ignore: /.*/
+ - deploy:
+ requires:
+ - build-release
+ filters:
+ tags:
+ only: /^v[0-9]+.*/
+ branches:
+ ignore: /.*/
+ - github-release:
+ requires:
+ - deploy
+ filters:
+ tags:
+ only: /^v[0-9]+.*/
+ branches:
+ ignore: /.*/
+
+
+