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

Commit 1794926

Browse files
Move the github-release to the proper location
1 parent b020794 commit 1794926

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

plugins/github-release/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# GitHub release Codefresh Plugin
2+
3+
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.
4+
5+
## Basic usage
6+
7+
This example creates a release and uploads files to it:
8+
9+
```
10+
github_prerelease:
11+
image: codefresh/cfstep-github-release
12+
environment:
13+
- GITHUB_TOKEN=${{GITHUB_TOKEN}}
14+
- FILES=bin/app-*
15+
- PRERELEASE=true
16+
```
17+
## Advanced usage
18+
19+
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:
20+
21+
```
22+
github_prerelease:
23+
image: codefresh/cfstep-github-release
24+
commands:
25+
- github-release edit --user $CF_REPO_OWNER --repo $CF_REPO_NAME --tag $CF_BRANCH_TAG_NORMALIZED --name "$CF_BRANCH_TAG_NORMALIZED"
26+
- github-release delete --user $CF_REPO_OWNER --repo $CF_REPO_NAME --tag $CF_BRANCH_TAG_NORMALIZED
27+
- github-release --help
28+
```
29+
30+
More details about the paramaters and examples see [here](https://github.com/aktau/github-release)
31+
32+
## Environment Variables
33+
34+
- `GITHUB_TOKEN`: token for access to GitHub
35+
- `CF_REPO_OWNER`: Codefresh provided variable containing repository owner name
36+
- `CF_REPO_NAME`: Codefresh provided variable containing repository name
37+
- `CF_BRANCH_TAG_NORMALIZED`: Codefresh provided variable containing branch/tag name
38+
- `PRERELEASE`: If true, this variable tells the plugin to create a pre-release
39+
- `FILES`: A glob expression for the list of the files to be uploaded

plugins/github-release/plugin.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
image: docker.io/codefresh/cfstep-github-release
2+
tag: master
3+
version: 0.1.0
4+
description: Plugin to make github releases
5+
keywords:
6+
- github
7+
- release
8+
home: https://github.com/codefresh-contrib/cfstep-github-release
9+
sources:
10+
- https://github.com/codefresh-contrib/cfstep-github-release
11+
maintainers:
12+
- name: Alex Cheshko
13+
email: a.cheshko@codefresh.io
14+
icon: A URL to an SVG or PNG image to be used as an icon (optional)
15+
envs:
16+
- name: GITHUB_TOKEN
17+
type: required
18+
description: Codefresh provided variable containing repository owner name
19+
- name: CF_REPO_OWNER
20+
type: required
21+
description: Codefresh provided variable containing repository owner name
22+
- name: CF_REPO_NAME
23+
type: required
24+
description: Codefresh provided variable containing repository name
25+
- name: CF_BRANCH_TAG_NORMALIZED
26+
type: required
27+
description: Codefresh provided variable containing branch/tag name
28+
- name: PRERELEASE
29+
description: If true, this variable tells the plugin to create a pre-release
30+
- name: FILES
31+
description: A glob expression for the list of the files to be uploaded
32+

0 commit comments

Comments
 (0)