pulumi/.goreleaser.yml

80 lines
2.1 KiB
YAML

dist: goreleaser
version: 2
project_name: pulumi
builds:
- &pulumibin
id: pulumi
binary: pulumi
dir: pkg
main: ./cmd/pulumi
gobinary: ../scripts/go-wrapper.sh
env:
- GO111MODULE=on
goos: ['linux', 'darwin', 'windows']
goarch: ['amd64', 'arm64']
goamd64: ['v1']
flags:
- -trimpath
ldflags:
- -w -s -X github.com/pulumi/pulumi/sdk/v3/go/common/version.Version=v{{.Env.PULUMI_VERSION}}
mod_timestamp: '{{ .CommitTimestamp }}'
tags:
# Enforce the pure Go implementation of os/user, even when cgo is available.
# See https://pkg.go.dev/os/user#pkg-overview.
- osusergo
- <<: *pulumibin
id: pulumi-language-go
binary: pulumi-language-go
dir: sdk/go/pulumi-language-go
main: ./
gobinary: ../../../scripts/go-wrapper.sh
- <<: *pulumibin
id: pulumi-language-nodejs
binary: pulumi-language-nodejs
dir: sdk/nodejs/cmd/pulumi-language-nodejs
main: ./
gobinary: ../../../../scripts/go-wrapper.sh
- <<: *pulumibin
id: pulumi-language-python
binary: pulumi-language-python
dir: sdk/python/cmd/pulumi-language-python
main: ./
gobinary: ../../../../scripts/go-wrapper.sh
- <<: *pulumibin
id: pulumi-display-wasm
binary: pulumi-display
dir: pkg
main: ./backend/display/wasm
goos: ['js']
goarch: ['wasm']
hooks:
post:
# Check the size of the WASM module.
- |
sh -c "[ `du -k {{ .Path }} | cut -f1` -le 79182 ] || (echo 'error: WASM module > 77M'; exit 1)"
archives:
- id: pulumi
wrap_in_directory: pulumi{{ if eq .Os "windows" }}/bin{{ end }}
format_overrides:
- goos: windows
format: zip
files:
# OS specific scripts, not compiled
- src: bin/{{ .Os }}/*
dst: '.'
strip_parent: true
# binaries
- src: 'bin/{{ .Os }}-{{ if eq .Arch "amd64" }}x64{{ else }}{{ .Arch }}{{ end }}/*'
dst: '.'
strip_parent: true
name_template: '{{ .ProjectName }}-{{ .Tag }}-{{ .Os }}-{{ if eq .Arch "amd64" }}x64{{ else }}{{ .Arch }}{{ end }}'
snapshot:
name_template: "{{ .Version }}-SNAPSHOT"
checksum:
name_template: "{{ .ProjectName }}-{{ .Version }}-checksums.txt"