GitHub Action to upload build artifacts to GitHub releases using ghr. The action will trigger on pushes to tags and exit neutrally otherwise.
GITHUB_TOKEN— Required. Grants access to the repository.
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 eithergz,bz2,xz, orzip. 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 eithertrueorfalseGHR_REPLACE— Optional. Replace artifacts if it is already uploaded. Can be eithertrueorfalseGHR_PARALLELISM— Optional. Set amount of parallelism
on: pushname: Build and release on pushjobs:
release:
name: Releaseruns-on: ubuntu-lateststeps:
- name: Releaseuses: fnkr/github-action-ghr@v1if: startsWith(github.ref, 'refs/tags/')env:
GHR_COMPRESS: xzGHR_PATH: build/GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}