Skip to content
This repository was archived by the owner on Nov 10, 2019. It is now read-only.

Move the github-release folder to the correct location #42

Merged
merged 1 commit into from
Jan 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions plugins/github-release/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# GitHub release Codefresh Plugin

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.

## Basic usage

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
```
## Advanced usage

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](https://github.com/aktau/github-release)

## Environment Variables

- `GITHUB_TOKEN`: token for access to GitHub
- `CF_REPO_OWNER`: Codefresh provided variable containing repository owner name
- `CF_REPO_NAME`: Codefresh provided variable containing repository name
- `CF_BRANCH_TAG_NORMALIZED`: Codefresh provided variable containing branch/tag name
- `PRERELEASE`: If true, this variable tells the plugin to create a pre-release
- `FILES`: A glob expression for the list of the files to be uploaded
32 changes: 32 additions & 0 deletions plugins/github-release/plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
image: docker.io/codefresh/cfstep-github-release
tag: master
version: 0.1.0
description: Plugin to make github releases
keywords:
- github
- release
home: https://github.com/codefresh-contrib/cfstep-github-release
sources:
- https://github.com/codefresh-contrib/cfstep-github-release
maintainers:
- name: Alex Cheshko
email: a.cheshko@codefresh.io
icon: A URL to an SVG or PNG image to be used as an icon (optional)
envs:
- name: GITHUB_TOKEN
type: required
description: Codefresh provided variable containing repository owner name
- name: CF_REPO_OWNER
type: required
description: Codefresh provided variable containing repository owner name
- name: CF_REPO_NAME
type: required
description: Codefresh provided variable containing repository name
- name: CF_BRANCH_TAG_NORMALIZED
type: required
description: Codefresh provided variable containing branch/tag name
- name: PRERELEASE
description: If true, this variable tells the plugin to create a pre-release
- name: FILES
description: A glob expression for the list of the files to be uploaded