Skip to content

Pass flags to hooks #35

@ayashjorden

Description

@ayashjorden

Hello,
It was easy to setup this action on my project, however, I have a new requirement to move the .goreleaser.yaml file under the .github folder.

I've gone through the source code of goreleaser, go-semantic-release/semantic-release, and its respective action, and I can't figure out how to pass the goreleaser flag -f path/to/.goreleaser.yaml from this action to the goreleaser hook.
From a different angle, I couldn't find the environment-variable that corresponds to the above in goreleasr own repo`.

jobs:
  release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version: '1.22.4'
      - uses: go-semantic-release/action@v1
        with:
          hooks: goreleaser <== How do I pass the `-f /path/to/.goreleaser.yaml` here?
          changelog-file: CHANGELOG.md
          allow-initial-development-versions: true
          prepend: true
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GORELEASER_CONFIG: <=== "this does not work as goreleaser does not bind on environment variables."

Thank you,
Jordan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions