Skip to content

Commit

Permalink
Add post build hook for windows signing
Browse files Browse the repository at this point in the history
  • Loading branch information
rquitales committed Jan 25, 2025
1 parent aa2a372 commit 8b97b61
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion native-provider-ci/src/goreleaser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface Build {
goarm?: string[];
skip?: boolean;
ignore?: Ignores[];
hooks?: { post: string[] };
}

export interface FormatOverride {
Expand Down Expand Up @@ -162,15 +163,28 @@ export class PulumiGoreleaserPreConfig implements GoreleaserConfig {
}
this.builds = [
{
id: "build-provider",
dir: "provider",
env: ["CGO_ENABLED=0", "GO111MODULE=on"],
goos: ["darwin", "windows", "linux"],
goos: ["darwin", "linux"],
goarch: ["amd64", "arm64"],
ignore: ignores,
main: `./cmd/pulumi-resource-${opts.provider}/`,
ldflags: ldflags,
binary: `pulumi-resource-${opts.provider}`,
},
{
id: "build-provider-sign-windows",
dir: "provider",
env: ["CGO_ENABLED=0", "GO111MODULE=on"],
goos: ["windows"],
goarch: ["amd64", "arm64"],
ignore: ignores,
main: `./cmd/pulumi-resource-${opts.provider}/`,
ldflags: ldflags,
binary: `pulumi-resource-${opts.provider}`,
hooks: {post: ["make sign-windows-exe-{{ .Arch }}"]},
},
];
// Don't disable CGO for azure-native and aws-native to support mac users
if (opts.provider === "azure-native" || opts.provider === "aws-native") {
Expand Down

0 comments on commit 8b97b61

Please sign in to comment.