goreleaser / goreleaser-action

GitHub Action for GoReleaser
https://github.com/marketplace/actions/goreleaser-action
MIT License
831 stars 73 forks source link

Inconsistent output between local run and action run #464

Open obs-gh-alexlew opened 3 weeks ago

obs-gh-alexlew commented 3 weeks ago

When I run the same command with the goreleaser github action, it places files into the archives in different locations than when I run it locally. Both environments are running the same version, 1.26.2-pro.

For a concrete example, I have a file located at packaging/windows/connection/host_monitoring/metrics.yaml in my repository.

Goreleaser.yaml config snippet:

  - id: windows
    format: zip
    builds:
      - windows_build
    name_template: >-
      {{ .ProjectName }}_
      {{- title .Os }}_
      {{- if eq .Arch "amd64" }}x86_64
      {{- else if eq .Arch "386" }}i386
      {{- else }}{{ .Arch }}{{ end }}
      {{- if .Arm }}v{{ .Arm }}{{ end }}
    files:
      - src: "packaging/windows/connections/**"
        dst: "connections/"

The command I'm running both locally and in the github action is goreleaser release --prepare --clean --snapshot --verbose

Locally, I get this in the output

    • adding file: packaging/windows/connections/host_monitoring/metrics.yaml as connections/host_monitoring/metrics.yaml

In the github action with the same .goreleaser.yaml I get

    • adding file: packaging/windows/connections/host_monitoring/metrics.yaml as connections/metrics.yaml

Why would the same command with the same config produce inconsistent results?

caarlos0 commented 3 weeks ago

weird, are both the action and your local machine running linux? if not, which OSs are you using in each?

obs-gh-alexlew commented 3 weeks ago

running macos locally, linux github action

caarlos0 commented 3 weeks ago

created this repo to try and repro it https://github.com/caarlos0-graveyard/gorel-dir-glob-repro

so far, got the same output on linux and macos with v2.0.0-pro (which is basically the same as v1.26.2-pro).

#
# linux:
 • adding file: dir/another/test as otherdir/test
 • adding file: dir/another/testetest as otherdir/testetest
#
# macos:
 • adding file: dir/another/test as otherdir/test
 • adding file: dir/another/testetest as otherdir/testetest
caarlos0 commented 3 weeks ago

on github action:

• adding file: dir/another/test as otherdir/test
• adding file: dir/another/testetest as otherdir/testetest

🤔