# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
dist: goreleaser
project_name: pulumi
before:
  hooks:
    - ./scripts/prep-for-goreleaser.sh
blobs:
- bucket: get.pulumi.com
  folder: releases/sdk/
  ids:
    - pulumi-unix
    - pulumi-windows
  provider: s3
  region: us-west-2
release:
  disable: true
changelog:
  skip: true
builds:
# Windows builds
- id: pulumi-windows
  binary: pulumi
  dir: pkg
  goarch:
    - amd64
  goos:
    - windows
  ldflags:
    - -X github.com/pulumi/pulumi/pkg/v3/version.Version={{.Tag}}
  main: ./cmd/pulumi
- id: pulumi-language-nodejs-windows
  binary: pulumi-language-nodejs
  dir: sdk
  goarch:
    - amd64
  goos:
    - windows
  ldflags:
    - -X github.com/pulumi/pulumi/pkg/v3/version.Version={{.Tag}}
  main: ./nodejs/cmd/pulumi-language-nodejs
- id: pulumi-language-python-windows
  binary: pulumi-language-python
  dir: sdk
  goarch:
    - amd64
  goos:
    - windows
  ldflags:
    - -X github.com/pulumi/pulumi/pkg/v3/version.Version={{.Tag}}
  main: ./python/cmd/pulumi-language-python
- id: pulumi-language-dotnet-windows
  binary: pulumi-language-dotnet
  dir: sdk
  goarch:
    - amd64
  goos:
    - windows
  ldflags:
    - -X github.com/pulumi/pulumi/pkg/v3/version.Version={{.Tag}}
  main: ./dotnet/cmd/pulumi-language-dotnet
- id: pulumi-language-go-windows
  binary: pulumi-language-go
  dir: sdk
  goarch:
    - amd64
  goos:
    - windows
  ldflags:
    - -X github.com/pulumi/pulumi/pkg/v3/version.Version={{.Tag}}
  main: ./go/pulumi-language-go
# UNIX builds
- id: pulumi-unix
  binary: pulumi
  dir: pkg
  goarch:
    - amd64
    - arm64
  goos:
    - linux
    - darwin
  ldflags:
    - -X github.com/pulumi/pulumi/pkg/v3/version.Version={{.Tag}}
  main: ./cmd/pulumi
- id: pulumi-language-nodejs-unix
  binary: pulumi-language-nodejs
  dir: sdk
  goarch:
    - amd64
    - arm64
  goos:
    - linux
    - darwin
  ldflags:
    - -X github.com/pulumi/pulumi/pkg/v3/version.Version={{.Tag}}
  main: ./nodejs/cmd/pulumi-language-nodejs
- id: pulumi-language-python-unix
  binary: pulumi-language-python
  dir: sdk
  goarch:
    - amd64
    - arm64
  goos:
    - linux
    - darwin
  ldflags:
    - -X github.com/pulumi/pulumi/pkg/v3/version.Version={{.Tag}}
  main: ./python/cmd/pulumi-language-python
- id: pulumi-language-dotnet-unix
  binary: pulumi-language-dotnet
  dir: sdk
  goarch:
    - amd64
    - arm64
  goos:
    - linux
    - darwin
  ldflags:
    - -X github.com/pulumi/pulumi/pkg/v3/version.Version={{.Tag}}
  main: ./dotnet/cmd/pulumi-language-dotnet
- id: pulumi-language-go-unix
  binary: pulumi-language-go
  dir: sdk
  goarch:
    - amd64
    - arm64
  goos:
    - linux
    - darwin
  ldflags:
    - -X github.com/pulumi/pulumi/pkg/v3/version.Version={{.Tag}}
  main: ./go/pulumi-language-go


archives:
- id: pulumi-unix
  wrap_in_directory: pulumi
  builds:
    - pulumi-language-dotnet-unix
    - pulumi-language-go-unix
    - pulumi-language-python-unix
    - pulumi-language-nodejs-unix
    - pulumi-unix
  replacements:
    amd64: x64
  files:
    - pulumi-resource-pulumi-nodejs
    - pulumi-resource-pulumi-python
    - pulumi-analyzer-policy
    - pulumi-analyzer-policy-python
    - pulumi-language-python-exec
  name_template: "{{ .ProjectName }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
- id: pulumi-windows
  wrap_in_directory: pulumi/bin
  builds:
    - pulumi-language-dotnet-windows
    - pulumi-language-go-windows
    - pulumi-language-python-windows
    - pulumi-language-nodejs-windows
    - pulumi-windows
  replacements:
    amd64: x64
  format: zip
  files:
    - pulumi-resource-pulumi-nodejs.cmd
    - pulumi-resource-pulumi-python.cmd
    - pulumi-python3-shim.cmd
    - pulumi-python-shim.cmd
    - pulumi-analyzer-policy.cmd
    - pulumi-analyzer-policy-python.cmd
    - pulumi-language-python-exec
  name_template: "{{ .ProjectName }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
snapshot:
  name_template: "{{ .Version }}-SNAPSHOT"
checksum: 
  name_template: "{{ .ProjectName }}-{{ .Version }}-checksums.txt"
