diff --git a/.github/workflows/build_provider.yml b/.github/workflows/build_provider.yml index 12cb537d..80f3c678 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-vault - - - name: Build windows provider - if: matrix.platform.os == 'windows' - run: make bin/${{ matrix.platform.os }}-${{ matrix.platform.arch }}/pulumi-resource-vault.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 7e1c93ce..7b132460 100644 --- a/Makefile +++ b/Makefile @@ -322,6 +322,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)