How to use Github Release API to make a release without source code?

后端 未结 3 565
栀梦
栀梦 2021-01-11 15:06

I am using blow command to publish a release on Github repo:

curl -X POST -H \"Authorization: token xxxxxxxxx\"  -d \'{\"tag_name\": \"test\", \"name\":\"rel         


        
3条回答
  •  时光取名叫无心
    2021-01-11 15:26

    You can control the contents of sorcecode archive within automatic generation using the .gitattributes file (and make it part of your repository).

    Add lines like:

    src export-ignore
    

    to exclude the directory "src" from being part of the generated source package. Internally github uses "git archive" to create packages based on the tags - and "git archive" can be controlled via ".gitattributes".

    Don't know whether you can avoid generating the source package completely - but this is at least a workaround to control the contents of the source code package

提交回复
热议问题