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

后端 未结 7 2083
半阙折子戏
半阙折子戏 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 06:47

    For those using gradle, the plugin gradle-github-plugin also allows to create releases and attach files to them.

    1. Add the plugin to the gradle.build:
    plugins {
      id "co.riiid.gradle" version "X.Y.Z"
    }
    
    1. Configure the upload. Example:
    github {
        owner = 'riiid'
        repo = 'gradle-github-plugin'
        token = 'XXXXXXXXXXXXXXXXXXXXX'
        tagName = '0.1.0'
        targetCommitish = 'master'
        name = 'v0.1.0'
        body = """# Project Name
    Write `release note` here.
    """
        assets = [
                'app/build/outputs/apk/app-release.apk',
                'app/build/outputs/mapping/release/mapping.txt',
                'app/build/outputs',
                ...
        ]
    }
    

提交回复
热议问题