Skip to content

Commit

Permalink
docs: add usage examples to readme (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Oct 22, 2023
1 parent 35734a9 commit 34b33ac
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Setup Release
id: setup-release
uses: LizardByte/setup-release-action@master
uses: LizardByte/setup-release-action@master # keep this on master, to prevent endless depandabot PRs
with:
changelog_path: ./tests/data/set${{ matrix.set }}/CHANGELOG.md
fail_on_events_api_error: false
Expand Down
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
# create-release-action
[![GitHub Workflow Status (CI)](https://img.shields.io/github/actions/workflow/status/lizardbyte/create-release-action/ci.yml.svg?branch=master&label=CI%20build&logo=github&style=for-the-badge)](https://github.com/LizardByte/create-release-action/actions/workflows/ci.yml?query=branch%3Amaster)

A reusable action to create a GitHub release. This action is tailored to the
@LizardByte organization, but can be used by anyone if they follow the same conventions.

This is basically a wrapper around [ncipollo/release-action](https://github.com/ncipollo/release-action), with some
different defaults to make it easier to use within the @LizardByte organization.

## Basic Usage

See [action.yml](action.yml)

```yaml
steps:
- name: Create Release
uses: LizardByte/create-release-action@master
with:
name: v0.1.0
tag: v0.1.0
token: ${{ secrets.GITHUB_TOKEN }}
```
## Inputs
| Name | Description | Default | Required |
|----------------------|--------------------------------------------------------------------------------------|-----------------|----------|
| allowUpdates | An optional flag which indicates if we should update a release if it already exists. | `true` | `false` |
| artifacts | The artifacts to upload. | `*artifacts/*` | `false` |
| body | The body of the release. | | `false` |
| discussionCategory | The category for the discussion. | `announcements` | `false` |
| generateReleaseNotes | Indicates if release notes should be automatically generated. | `false` | `false` |
| name | The version to create. | | `true` |
| prerelease | Whether the release is a prerelease. | `false` | `false` |
| tag | The tag to create. | | `true` |
| token | GitHub Token. | | `true` |

## See Also

This action is meant to be used in conjunction with
[LizardByte/setup-release-action](https://github.com/LizardByte/setup-release-action).
5 changes: 3 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ inputs:
default: 'true'
artifacts:
description: 'The artifacts to upload.'
required: true
required: false
default: '*artifacts/*'
body:
description: 'The body of the release.'
required: true
required: false
default: ''
discussionCategory:
description: 'The category of the discussion.'
required: false
Expand Down

0 comments on commit 34b33ac

Please sign in to comment.