Skip to content

GitHub Action to upload build artifacts to GitHub releases.

License

Notifications You must be signed in to change notification settings

fnkr/github-action-ghr

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action to upload build artifacts to GitHub releases using ghr. The action will trigger on pushes to tags and exit neutrally otherwise.

Secrets

  • GITHUB_TOKENRequired. Grants access to the repository.

Variables

  • GHR_PATHRequired. 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_COMPRESSOptional. 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_DELETEOptional. Delete release and its git tag in advance if it exists. Can be either true or false

  • GHR_REPLACEOptional. Replace artifacts if it is already uploaded. Can be either true or false

  • GHR_PARALLELISMOptional. Set amount of parallelism

Usage example

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 }}

About

GitHub Action to upload build artifacts to GitHub releases.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published