From ac249cf51f2e9dfce84b872e6e75e442d98dfd54 Mon Sep 17 00:00:00 2001 From: Pulumi Bot Date: Wed, 11 Dec 2024 05:30:34 +0000 Subject: [PATCH] [internal] Update GitHub Actions workflow files --- .github/workflows/build_provider.yml | 10 +++------- Makefile | 7 +++++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_provider.yml b/.github/workflows/build_provider.yml index e82e5851..9bdf2775 100644 --- a/.github/workflows/build_provider.yml +++ b/.github/workflows/build_provider.yml @@ -15,6 +15,7 @@ jobs: env: PROVIDER_VERSION: ${{ inputs.version }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + AZURE_SIGNING_CONFIGURED: ${{ secrets.AZURE_SIGNING_CLIENT_ID != '' && secrets.AZURE_SIGNING_CLIENT_SECRET != '' && secrets.AZURE_SIGNING_TENANT_ID != '' && secrets.AZURE_SIGNING_KEY_VAULT_URI != '' }} strategy: fail-fast: true matrix: @@ -52,15 +53,10 @@ jobs: run: make --touch provider schema - name: Build provider - if: matrix.platform.os != 'windows' - run: make bin/${{ matrix.platform.os }}-${{ matrix.platform.arch }}/pulumi-resource-docker - - - name: Build windows provider - if: matrix.platform.os == 'windows' - run: make bin/${{ matrix.platform.os }}-${{ matrix.platform.arch }}/pulumi-resource-docker.exe + run: make "provider-${{ matrix.platform.os }}-${{ matrix.platform.arch }}" - name: Sign windows provider - if: matrix.platform.os == 'windows' + if: matrix.platform.os == 'windows' && env.AZURE_SIGNING_CONFIGURED == 'true' run: | az login --service-principal \ -u ${{ secrets.AZURE_SIGNING_CLIENT_ID }} \ diff --git a/Makefile b/Makefile index 3079c131..3d174fbb 100644 --- a/Makefile +++ b/Makefile @@ -325,6 +325,13 @@ bin/%/$(PROVIDER) bin/%/$(PROVIDER).exe: export CGO_ENABLED=0 && \ go build -o "${WORKING_DIR}/$@" $(PULUMI_PROVIDER_BUILD_PARALLELISM) -ldflags "$(LDFLAGS)" "$(PROJECT)/$(PROVIDER_PATH)/cmd/$(PROVIDER)" +provider-linux-amd64: bin/linux-amd64/$(PROVIDER) +provider-linux-arm64: bin/linux-arm64/$(PROVIDER) +provider-darwin-amd64: bin/darwin-amd64/$(PROVIDER) +provider-darwin-arm64: bin/darwin-arm64/$(PROVIDER) +provider-windows-amd64: bin/windows-amd64/$(PROVIDER).exe +.PHONY: provider-linux-amd64 provider-linux-arm64 provider-darwin-amd64 provider-darwin-arm64 provider-windows-amd64 + bin/$(PROVIDER)-v$(VERSION_GENERIC)-linux-amd64.tar.gz: bin/linux-amd64/$(PROVIDER) bin/$(PROVIDER)-v$(VERSION_GENERIC)-linux-arm64.tar.gz: bin/linux-arm64/$(PROVIDER) bin/$(PROVIDER)-v$(VERSION_GENERIC)-darwin-amd64.tar.gz: bin/darwin-amd64/$(PROVIDER)