@@ -57,3 +57,70 @@ tasks:
57
57
description : rust-code-analysis lint and test
58
58
59
59
source : ${repository}/raw/${head_rev}/.taskcluster.yml
60
+
61
+ - $if : ' tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
62
+ then :
63
+ taskId : {$eval: as_slugid("build_release")}
64
+ dependencies :
65
+ - {$eval: as_slugid("lint_test_task")}
66
+ created : {$fromNow: ''}
67
+ deadline : {$fromNow: '2 hour'}
68
+ provisionerId : proj-relman
69
+ workerType : ci
70
+ payload :
71
+ maxRunTime : 3600
72
+ image : " rust:buster"
73
+ env :
74
+ PROJECT_NAME : rust-code-analysis
75
+ command :
76
+ - " /bin/bash"
77
+ - " -cx"
78
+ - " git clone --recursive --quiet ${repository} &&
79
+ cd rust-code-analysis &&
80
+ git -c advice.detachedHead=false checkout ${head_rev} &&
81
+ cargo build --release &&
82
+ cd target/release &&
83
+ tar -zvcf /build.tar.gz --transform 's,^,rust-code-analysis-linux-x86_64/,' rust-code-analysis"
84
+ artifacts :
85
+ public/rust-code-analysis-linux-x86_64.tar.gz :
86
+ expires : {$fromNow: '2 weeks'}
87
+ path : /build.tar.gz
88
+ type : file
89
+ metadata :
90
+ name : rust-code-analysis release build
91
+ description : rust-code-analysis release build
92
+
93
+ source : ${repository}/raw/${head_rev}/.taskcluster.yml
94
+
95
+ - $if : ' tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
96
+ then :
97
+ $let :
98
+ version : {$eval: 'head_branch[10:]'}
99
+ in :
100
+ taskId : {$eval: as_slugid("deploy_release")}
101
+ dependencies :
102
+ - {$eval: as_slugid("build_release")}
103
+ created : {$fromNow: ''}
104
+ deadline : {$fromNow: '2 hour'}
105
+ provisionerId : proj-relman
106
+ workerType : ci
107
+ scopes :
108
+ - secrets:get:project/relman/rust-code-analysis/deploy
109
+ payload :
110
+ features :
111
+ taskclusterProxy : true
112
+ maxRunTime : 3600
113
+ image : " mozilla/taskboot:0.2.0"
114
+ env :
115
+ TASKCLUSTER_SECRET : project/relman/rust-code-analysis/deploy
116
+ command :
117
+ - taskboot
118
+ - github-release
119
+ - mozilla/rust-code-analysis
120
+ - " ${version}"
121
+ - " --asset=rust-code-analysis-linux-x86_64.tar.gz:public/rust-code-analysis-linux-x86_64.tar.gz"
122
+ metadata :
123
+ name : " rust-code-analysis release publication ${version}"
124
+ description : rust-code-analysis release publication on Github
125
+
126
+ source : ${repository}/raw/${head_rev}/.taskcluster.yml
0 commit comments