github-action-ghr icon indicating copy to clipboard operation
github-action-ghr copied to clipboard

Needs more options parameter.

Open ernitishkumar opened this issue 5 years ago • 1 comments

The actual ghr provides -r parameter to provide name of repository make release to. But this action seems to be using the current repository for which the action is running.

It would be great if you can provide configurable -r parameter also.

ernitishkumar avatar May 27 '20 21:05 ernitishkumar

Hi @ernitishkumar,

I've added several options to the ghr-options branch. Can you please try if this works for you?

Note: ${{ secrets.GITHUB_TOKEN }} only grants access to the current repository. If you're releasing to another repository, you'll need to use a personal access token with repo scope instead.

on: push
name: Release
jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    steps:
      - name: Build
        run: mkdir bin && touch bin/test
      - name: Release
        uses: fnkr/github-action-ghr@ghr-options
        if: startsWith(github.ref, 'refs/tags/')
        env:
          GHR_COMPRESS: xz
          GHR_PATH: build/
          GHR_REPOSITORY: user/repo
          GITHUB_TOKEN: your_github_token

fnkr avatar May 30 '20 10:05 fnkr