Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: getDistPath #415

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,23 @@ jobs:
name: Check dist
run: |
tree -nh ./test/_output

anchors:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
-
name: GoReleaser
uses: ./
with:
args: release --config .goreleaser-anchors.yml --skip-publish --clean --snapshot
workdir: ./test
8 changes: 8 additions & 0 deletions __tests__/fixtures/goreleaser-anchors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
x-build: &build_base
env:
- CGO_ENABLED=0

project_name: test
dist: /foo
builds:
- <<: *build_base
15 changes: 15 additions & 0 deletions __tests__/fixtures/goreleaser-dist.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
env:
- GO111MODULE=on

dist: /bar

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
8 changes: 8 additions & 0 deletions __tests__/fixtures/goreleaser-invalid.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
&shared:
build: &build_base
env:
- CGO_ENABLED=0

project_name: test
builds:
- <<: *build_base