From 139f5f7914d49e14e4ed281d5afe7cab15dda912 Mon Sep 17 00:00:00 2001 From: Yoshifumi Kawai Date: Wed, 15 Apr 2020 15:29:29 +0900 Subject: [PATCH] more CI settings to release automatically --- .circleci/config.yml | 25 ++++++++++++++++++- Assets/Editor/PackageExporter.cs | 2 +- .../Editor/UniTaskTrackerWindow.cs | 2 +- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ce48964..822e229 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,6 +6,9 @@ executors: version: {type: string} docker: - image: gableroux/unity3d:<< parameters.version >> + go: + docker: + - image: circleci/golang commands: unity_activate: parameters: @@ -57,6 +60,17 @@ jobs: - store_artifacts: path: ./UniRx.Async.unitypackage destination: /UniRx.Async.unitypackage + # upload to github by ghr + upload-github: + executor: go + steps: + - attach_workspace: + at: . + - run: go get github.com/tcnksm/ghr + - run: ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} ${CIRCLE_TAG} . + - store_artifacts: + path: UniRx.Async.unitypackage + destination: UniRx.Async.unitypackage workflows: version: 2 build-unity: @@ -81,4 +95,13 @@ workflows: # # UniTask minimum support version is 2018.3(C# 7.x) # - build-and-test: # unity_version: 2018.3.12f1 - # unity_license: ${UNITY_LICENSE_2018_3} \ No newline at end of file + # unity_license: ${UNITY_LICENSE_2018_3} + - upload-github: + requires: + - build-and-test + - build-and-create-package + filters: + tags: + only: /^\d\.\d\.\d.*/ + branches: + ignore: /.*/ \ No newline at end of file diff --git a/Assets/Editor/PackageExporter.cs b/Assets/Editor/PackageExporter.cs index 0d034bd..1e3fa93 100644 --- a/Assets/Editor/PackageExporter.cs +++ b/Assets/Editor/PackageExporter.cs @@ -17,7 +17,7 @@ public static class PackageExporter var path = Path.Combine(Application.dataPath, root); var assets = Directory.EnumerateFiles(path, "*", SearchOption.AllDirectories) - .Where(x => Path.GetExtension(x) == ".cs" || Path.GetExtension(x) == ".asmdef" || Path.GetExtension(x) == ".json") + .Where(x => Path.GetExtension(x) == ".cs" || Path.GetExtension(x) == ".asmdef" || Path.GetExtension(x) == ".json" || Path.GetExtension(x) == ".meta") .Select(x => "Assets" + x.Replace(Application.dataPath, "").Replace(@"\", "/")) .ToArray(); diff --git a/Assets/UniRx.Async/Editor/UniTaskTrackerWindow.cs b/Assets/UniRx.Async/Editor/UniTaskTrackerWindow.cs index 5acb2c4..73bbb18 100644 --- a/Assets/UniRx.Async/Editor/UniTaskTrackerWindow.cs +++ b/Assets/UniRx.Async/Editor/UniTaskTrackerWindow.cs @@ -18,7 +18,7 @@ namespace UniRx.Async.Editor static UniTaskTrackerWindow window; - [MenuItem("Window/UniRx/UniTask Tracker")] + [MenuItem("Window/UniTask Tracker")] public static void OpenWindow() { if (window != null)