fix: dist resolution from config file (#369)
ci / ci (goreleaser, macOS-latest, latest) (push) Waiting to run
ci / ci (goreleaser, macOS-latest, ~> 0.182) (push) Waiting to run
ci / ci (goreleaser, windows-latest, latest) (push) Waiting to run
ci / ci (goreleaser, windows-latest, ~> 0.182) (push) Waiting to run
ci / ci (goreleaser-pro, macOS-latest, latest) (push) Waiting to run
ci / ci (goreleaser-pro, macOS-latest, ~> 0.182) (push) Waiting to run
ci / ci (goreleaser-pro, windows-latest, latest) (push) Waiting to run
ci / ci (goreleaser-pro, windows-latest, ~> 0.182) (push) Waiting to run
ci / signing (macOS-latest) (push) Waiting to run
ci / signing (windows-latest) (push) Waiting to run
ci / ci (goreleaser, ubuntu-latest, latest) (push) Failing after 10s
ci / ci (goreleaser, ubuntu-latest, ~> 0.182) (push) Successful in 12s
ci / ci (goreleaser-pro, ubuntu-latest, latest) (push) Failing after 19s
ci / install-only (goreleaser-pro, ~> 0.166) (push) Successful in 10s
ci / signing (ubuntu-latest) (push) Failing after 3s
ci / current-tag (push) Failing after 11s
ci / install-only (goreleaser-pro, latest) (push) Failing after 19s
ci / upload-artifact (push) Failing after 12s
ci / ci (goreleaser-pro, ubuntu-latest, ~> 0.182) (push) Failing after 20s
ci / install-only (goreleaser, ~> 0.166) (push) Successful in 19s
ci / install-only (goreleaser, latest) (push) Failing after 19s
ci / dist (push) Failing after 51s
ci / ci (goreleaser, macOS-latest, latest) (push) Waiting to run
ci / ci (goreleaser, macOS-latest, ~> 0.182) (push) Waiting to run
ci / ci (goreleaser, windows-latest, latest) (push) Waiting to run
ci / ci (goreleaser, windows-latest, ~> 0.182) (push) Waiting to run
ci / ci (goreleaser-pro, macOS-latest, latest) (push) Waiting to run
ci / ci (goreleaser-pro, macOS-latest, ~> 0.182) (push) Waiting to run
ci / ci (goreleaser-pro, windows-latest, latest) (push) Waiting to run
ci / ci (goreleaser-pro, windows-latest, ~> 0.182) (push) Waiting to run
ci / signing (macOS-latest) (push) Waiting to run
ci / signing (windows-latest) (push) Waiting to run
ci / ci (goreleaser, ubuntu-latest, latest) (push) Failing after 10s
ci / ci (goreleaser, ubuntu-latest, ~> 0.182) (push) Successful in 12s
ci / ci (goreleaser-pro, ubuntu-latest, latest) (push) Failing after 19s
ci / install-only (goreleaser-pro, ~> 0.166) (push) Successful in 10s
ci / signing (ubuntu-latest) (push) Failing after 3s
ci / current-tag (push) Failing after 11s
ci / install-only (goreleaser-pro, latest) (push) Failing after 19s
ci / upload-artifact (push) Failing after 12s
ci / ci (goreleaser-pro, ubuntu-latest, ~> 0.182) (push) Failing after 20s
ci / install-only (goreleaser, ~> 0.166) (push) Successful in 19s
ci / install-only (goreleaser, latest) (push) Failing after 19s
ci / dist (push) Failing after 51s
* ci: add job to check dist output from config * fix: dist resolution from config file Co-authored-by: CrazyMax <[email protected]>
This commit is contained in:
@@ -196,3 +196,27 @@ jobs:
|
||||
workdir: ./test
|
||||
env:
|
||||
GORELEASER_CURRENT_TAG: v99.99.99
|
||||
|
||||
dist:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
-
|
||||
name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
-
|
||||
name: GoReleaser
|
||||
uses: ./
|
||||
with:
|
||||
args: release --config .goreleaser-dist.yml --skip-publish --rm-dist
|
||||
workdir: ./test
|
||||
-
|
||||
name: Check dist
|
||||
run: |
|
||||
tree -nh ./test/_output
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -82,7 +82,7 @@ const getFilename = (distribution: string): string => {
|
||||
};
|
||||
|
||||
export async function getDistPath(yamlfile: string): Promise<string> {
|
||||
const cfg = yaml.load(yamlfile);
|
||||
const cfg = yaml.load(fs.readFileSync(yamlfile, 'utf8'));
|
||||
return cfg.dist || 'dist';
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
|
||||
before:
|
||||
hooks:
|
||||
- go mod download
|
||||
|
||||
builds:
|
||||
-
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- darwin
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
|
||||
dist: _output
|
||||
Reference in New Issue
Block a user