https://github.com/fnkr/github-action-ghr
GitHub Action to upload build artifacts to GitHub releases.
https://github.com/fnkr/github-action-ghr
github-actions
Last synced: 8 months ago
JSON representation
GitHub Action to upload build artifacts to GitHub releases.
- Host: GitHub
- URL: https://github.com/fnkr/github-action-ghr
- Owner: fnkr
- License: mit
- Created: 2019-04-06T20:10:54.000Z (almost 7 years ago)
- Default Branch: v1
- Last Pushed: 2022-02-15T09:06:48.000Z (almost 4 years ago)
- Last Synced: 2025-04-22T06:09:03.210Z (9 months ago)
- Topics: github-actions
- Language: Shell
- Size: 9.77 KB
- Stars: 61
- Watchers: 1
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [github-action-ghr](https://github.com/fnkr/github-action-ghr)
GitHub Action to upload build artifacts to GitHub releases using [ghr](https://github.com/tcnksm/ghr).
The action will trigger on pushes to tags and exit neutrally otherwise.
## Secrets
- `GITHUB_TOKEN` — **Required.** Grants access to the repository.
## Variables
- `GHR_PATH` — **Required.**
Path to the artifacts you want to upload.
You can specify a file or a directory.
If you provide a directory, all files in that directory will be uploaded.
- `GHR_COMPRESS` — **Optional.**
Compress files before uploading them.
Can be either `gz`, `bz2`, `xz`, or `zip`.
The correct file extension will be appended (e.g. `.tar.gz`, or `.zip`).
- `GHR_DELETE` — **Optional.**
Delete release and its git tag in advance if it exists.
Can be either `true` or `false`
- `GHR_REPLACE` — **Optional.**
Replace artifacts if it is already uploaded.
Can be either `true` or `false`
- `GHR_PARALLELISM` — **Optional.**
Set amount of parallelism
## Usage example
### YAML
```yaml
on: push
name: Build and release on push
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Release
uses: fnkr/github-action-ghr@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GHR_COMPRESS: xz
GHR_PATH: build/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```