forked from mirrors/action-gh-release
add support for loading release body from a path. fixes: #2
This commit is contained in:
parent
cf33f83220
commit
2dfad92b71
3 changed files with 66 additions and 8 deletions
45
README.md
45
README.md
|
@ -42,6 +42,8 @@ A common case for GitHub releases is to upload your binary after its been valida
|
|||
Use the `with.files` input to declare a comma-separated list of glob expressions matching the files
|
||||
you wish to upload to GitHub releases. If you'd like you can just list the files by name directly.
|
||||
|
||||
Below is an example of uploading a single asset named `Release.txt`
|
||||
|
||||
```yaml
|
||||
name: Main
|
||||
|
||||
|
@ -66,18 +68,49 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
### 📝 External release notes
|
||||
|
||||
Many systems exist that can help generate release notes for you. This action supports
|
||||
loading release notes from a path in your repository's build to allow for the flexibility
|
||||
of using any changelog generator for your releases, including a human 👩💻
|
||||
|
||||
```yaml
|
||||
name: Main
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Generate Changeload
|
||||
run: echo "# Good things have arrived" > ${{ github.workflow }}-CHANGELOG.txt
|
||||
- name: Release
|
||||
uses: docker://softprops/action-gh-release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
body_path: ${{ github.workflow }}-CHANGELOG.txt
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
### 💅 Customizing
|
||||
|
||||
#### inputs
|
||||
|
||||
The following are optional as `step.with` keys
|
||||
|
||||
| Name | Type | Description |
|
||||
|---------|---------|---------------------------------------------------------------|
|
||||
| `body` | String | Text communicating notable changes in this release |
|
||||
| `draft` | Boolean | Indicator of whether or not this release is a draft |
|
||||
| `files` | String | Comma-delimited globs of paths to assets to upload for release|
|
||||
| `name` | String | Name of the release. defaults to tag name |
|
||||
| Name | Type | Description |
|
||||
|-------------|---------|-----------------------------------------------------------------|
|
||||
| `body` | String | Text communicating notable changes in this release |
|
||||
| `body_path` | String | Path to load text communicating notable changes in this release |
|
||||
| `draft` | Boolean | Indicator of whether or not this release is a draft |
|
||||
| `files` | String | Comma-delimited globs of paths to assets to upload for release |
|
||||
| `name` | String | Name of the release. defaults to tag name |
|
||||
|
||||
💡When providing a `body` and `body_path` at the same time, `body_path` will be attempted first, then falling back on `body` if the path can not be read from.
|
||||
|
||||
#### environment variables
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue