A quick plugin to cover specific use case: create releases in GitHub and upload files for them. The plugin also allows to do more complex actions overriding the command manually.
This example creates a release and uploads files to it:
github_prerelease:
image: codefresh/cfstep-github-release
environment:
- GITHUB_TOKEN=${{GITHUB_TOKEN}}
- FILES=bin/app-*
- PRERELEASE=true
If one wants to do more actions to manage releases than just to create them, it is possible to override the behaviour with custom commands:
github_prerelease:
image: codefresh/cfstep-github-release
commands:
- github-release edit --user $CF_REPO_OWNER --repo $CF_REPO_NAME --tag $CF_BRANCH_TAG_NORMALIZED --name "$CF_BRANCH_TAG_NORMALIZED"
- github-release delete --user $CF_REPO_OWNER --repo $CF_REPO_NAME --tag $CF_BRANCH_TAG_NORMALIZED
- github-release --help
More details about the paramaters and examples see here
GITHUB_TOKEN
: token for access to GitHubCF_REPO_OWNER
: Codefresh provided variable containing repository owner nameCF_REPO_NAME
: Codefresh provided variable containing repository nameCF_BRANCH_TAG_NORMALIZED
: Codefresh provided variable containing branch/tag namePRERELEASE
: If true, this variable tells the plugin to create a pre-releaseFILES
: A glob expression for the list of the files to be uploaded