Skip to content

Commit

Permalink
docs(api): basic usage of release asset management
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin-de-Jong committed Jun 24, 2023
1 parent 3e452d4 commit aa12e7b
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ A GitHub Action to create GitHub Releases based on the [Conventional Commits] si

- Simple to use
- Automatic creation of GitHub Releases
- Management of [GitHub Release assets](#uploading-assets)
- [Configurable changelog](#github-release-configuration)

## Usage
Expand Down Expand Up @@ -48,6 +49,21 @@ jobs:
run: echo ${{ fromJSON(steps.release.outputs.release).tag_name }}
```
## Uploading assets
Currently, it is only possible to transfer build artifacts, uploaded in your current workflow, to your GitHub Release.
This can be done by providing the `artifacts` input parameter, for ex.:

```yaml
- name: Run ReleaseMe
uses: dev-build-deploy/release-me@v0
with:
token: ${{ github.token }}
artifacts: |
artifact Foo
artifact Bar
```

## GitHub Release Configuration

You can configure the body of the GitHub Release by using a configuration file (loosely based on [Automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes));
Expand Down Expand Up @@ -85,18 +101,18 @@ changelog:

## Inputs

| Key | Description |
| --- | --- |
| `token` | GitHub token used to access GitHub |
| `prefix` | Prefix for the Semantic Version, MUST be one of `[A-Za-z0-9-.]` |
| Key | Required | Description |
| --- | --- | --- |
| `token` | YES | GitHub token used to access GitHub |
| `prefix` | NO | Prefix for the Semantic Version, MUST be one of `[A-Za-z0-9-.]` |
| `config` | NO | Path to the Release configuration, defaults to `.github/release.yml` |
| `artifacts` | NO | Multiline list of artifact names, uploaded as part of the current workflow run, to upload as a GitHub Release asset |

## Outputs

| Key | Description |
| --- | --- |
| `created` | Set to `true` when a release was created, otherwise the output is not set |
| `release` | [Release object](./src/release.ts) containing relevant information about the created release. Only set when `created` is set to `true`.|
| `config` | Path to the Release configuration, defaults to `.github/release.yml` |

## Permissions

Expand Down

0 comments on commit aa12e7b

Please sign in to comment.