mirror of
https://github.com/goreleaser/goreleaser-action.git
synced 2026-05-14 14:50:32 +00:00
fix: dist resolution from config file (#369)
* ci: add job to check dist output from config * fix: dist resolution from config file Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
ef54bd4cd6
commit
ff11ca24a9
5 changed files with 45 additions and 3 deletions
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
|
|||
18
test/.goreleaser-dist.yml
Normal file
18
test/.goreleaser-dist.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
env:
|
||||
- GO111MODULE=on
|
||||
|
||||
before:
|
||||
hooks:
|
||||
- go mod download
|
||||
|
||||
builds:
|
||||
-
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- darwin
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
|
||||
dist: _output
|
||||
Loading…
Add table
Add a link
Reference in a new issue