> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# h-matsuo/github-release

Create / delete GitHub's Releases.
Issues & PRs: https://github.com/h-matsuo/circleci-orb-github-release


## Commands

### delete

Delete an existing release.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `github-token-variable` | string | $GITHUB_TOKEN | Environment variable containing your GitHub personal access token. |
| `user` | string | $CIRCLE_PROJECT_USERNAME | GitHub repository user or organization. |
| `repository` | string | $CIRCLE_PROJECT_REPONAME | GitHub repository. |
| `tag` | string |  | Git tag for the release. |

### create

Create a new release.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `github-token-variable` | string | $GITHUB_TOKEN | Environment variable containing your GitHub personal access token. |
| `user` | string | $CIRCLE_PROJECT_USERNAME | GitHub repository user or organization. |
| `repository` | string | $CIRCLE_PROJECT_REPONAME | GitHub repository. |
| `tag` | string |  | Git tag using as the version number of the release. |
| `target` | string | $CIRCLE_SHA1 | Git commitish (commit SHA or branch name) containing the project you want to release. |
| `title` | string |  | Name of the release. |
| `description` | string |  | Description of the release. |
| `file-path` | string |  | File path to be uploaded.
If directory, all files in the directory will be uploaded.
If empty, just create a new release without uploading any files.
 |
| `draft` | boolean | false | Set true if the release is a draft. |
| `pre-release` | boolean | false | Set true if the release is a pre-release. |

### internal__install-deps

(For INTERNAL use only)

## Executors

### default

| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag` | string | latest | Pick a specific circleci/golang image variant. |

## Examples

### delete

Delete an existing release.
Make sure you set $GITHUB_TOKEN to your GitHub personal access token in advance.


```yaml
version: 2.1
orbs:
  github-release: h-matsuo/github-release@0.1.1
jobs:
  build:
    description: Delete the release tagged `vX.Y.Z`.
    executor: github-release/default
    steps:
      - github-release/delete:
          tag: vX.Y.Z
```

### create

Publish a new release with artifacts.
Make sure you set $GITHUB_TOKEN to your GitHub personal access token in advance.


```yaml
version: 2.1
orbs:
  github-release: h-matsuo/github-release@0.1.1
jobs:
  build:
    description: Create dummy file and publish a new release tagged `vX.Y.Z`.
    executor: github-release/default
    steps:
      - run:
          command: |
            mkdir artifacts
            echo dummy > ./artifacts/file
      - github-release/create:
          tag: vX.Y.Z
          title: Version vX.Y.Z
          description: This release is version vX.Y.Z .
          file-path: ./artifacts/file
```