How to deploy artifact to github releases using TeamCity

I configured TeamCity to pull and build my github rehearsal. How does he create a .zip artifact with files located in the bin / Debug folder. After that, I want him to create a new tag with the build number and click it on github releases, but I don’t know how to do it.

+4
source share
1 answer

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

! , , .

+4

Source: https://habr.com/ru/post/1676590/


All Articles