How to release a build artifact asset on GitHub with a script?

后端 未结 7 2082
半阙折子戏
半阙折子戏 2020-12-01 06:38

I am trying to figure out a one-command process for generating a build on GitHub.

What I anticipate doing is running some sort of command- make release, say, and the

相关标签:
7条回答
  • 2020-12-01 07:05

    Preparation:

    1) Download github-releases and put its executable in your PATH.
    2) Create a token at https://github.com/settings/applications#personal-access-tokens let's say abc123

    Uploading an artifact:

    1) Let's say you have just compiled what you decide to call version 3.1, and want to upload it.
    2) Make sure you have committed everything.
    3) Run these five commands:

    git tag v3.1
    git push
    git push --tags
    
    github-release release --security-token abc123 --user <you> --repo <yourrepo> \
        --tag v3.1
    
    github-release upload --security-token abc123 --user <you> --repo <yourrepo> \
        --tag v3.1 --name <thefile> --file <thefile>
    

    You can upload several files, for instance for different operating systems.

    (Based on VonC's answer, which unfortunately does not detail how to upload an artifact)

    0 讨论(0)
提交回复
热议问题