After researching, I finally found the answer.
- Install github-release on the TeamCity agent machine. to install github-release get the latest version and extract the exe file somewhere on the disk (In my case, C: \ Program Files (X86) \ GitHub release \ Bin \ Windows \ amd64)
- github.
- .
ArtifactPaths
MyProjectName\bin\Debug = > DependentArtifact.zip ( ) "".
- .
= > = > Finish Build Trigger = >
" "
- :
= > . Depend On = . = . = DependentArtifact.zip
:
Build Steps = > = > CommandLine script script:
[PathToYourRepo] git Release-v0.% build.number%
[PathToYourRepo] git
[PathToYourRepo] git push --tags
[PathToGithubReleaseExe] release - [YourSecurityToken] --user [YourGithubUserName] --repo [YourRepoName ] --tag Release-v0.% build.number%
[PathToGithubReleaseExe] upload --security- [YourSecurityToken] --user [YourGithubUserName] --repo [YourRepoName ] --tag Release-v0.% build.number% --name Release-v0.% build.number%.zip -file DependentArtifact.zip
! , , .