2019-08-25 02:14:36 -04:00
# action gh-release [](https://github.com/softprops/action-gh-release/actions)
2019-08-25 02:13:05 -04:00
2019-08-25 16:22:42 -04:00
📦 A [Github Action ](https://help.github.com/en/categories/automating-your-workflow-with-github-actions ) for creating [Github Releases ](https://help.github.com/en/articles/creating-releases )
2019-08-25 02:17:36 -04:00
2019-08-25 15:24:49 -04:00
## Usage
```yaml
name: Main
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build
run: echo ${{ github.sha }} > Release.txt
2019-08-25 16:22:42 -04:00
- name: Test
run: cat Release.txt
2019-08-25 15:24:49 -04:00
- name: Release
uses: docker://softprops/action-gh-release
2019-08-25 16:22:42 -04:00
if: startsWith(github.ref, 'refs/tags/')
2019-08-25 15:25:36 -04:00
with:
files: Release.txt
2019-08-25 15:24:49 -04:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
2019-08-25 02:17:36 -04:00
Doug Tangren (softprops) 2019