tag:help.appveyor.com,2012-11-13:/discussions/problems/5834-deploy-to-github-releases-with-token-from-envAppVeyor: Discussion 2018-10-19T08:18:09Ztag:help.appveyor.com,2012-11-13:Comment/416960522017-01-08T05:06:14Z2017-01-08T05:06:14ZDeploy to Github Releases with token from env<div><p>Something like this should work:</p>
<pre>
<code>environment:
github_token:
secure: 6pYySM2k+sR/0nA3yVBPW1zZNDADE29vLvXLYxa5YhM=
github_token1:
secure: 2r2cYS4BeP4pcwBqYk2LqvKwLBEKTWd9Id5OPFqWyL0=
github_token2:
secure: 79AlSg5VPUVdpT9yflNK0G2hJ2xacS+NuqhHIuIRBx0=
before_deploy:
- ps: >-
if ($env:APPVEYOR_REPO_COMMIT_AUTHOR -eq "author1") {$env:github_token = $env:github_token1}
elseif ($env:APPVEYOR_REPO_COMMIT_AUTHOR -eq "author2") {$env:github_token = $env:github_token2}
deploy:
- provider: GitHub
auth_token: $(github_token)</code>
</pre></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/416960522017-01-08T15:10:47Z2017-01-08T15:10:47ZDeploy to Github Releases with token from env<div><p>Thanks! My first try to use a secure env var for the deployment
failed due to a copy/paste error. I tried again and it works
fine.</p></div>l.erlacher