diff --git a/.github/actions/download-bin/action.yml b/.github/actions/download-bin/action.yml index 5832f2f8..8b141774 100644 --- a/.github/actions/download-bin/action.yml +++ b/.github/actions/download-bin/action.yml @@ -1,16 +1,23 @@ -name: Download binary assets -description: Downloads the provider and tfgen binaries to `bin/`. +name: Download the provider binary +description: Downloads the provider binary to `bin/`. runs: using: "composite" steps: - - name: Download provider + tfgen binaries + + - name: Download pulumi-resource-xyz uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: xyz-provider.tar.gz + pattern: pulumi-resource-xyz-*-linux-amd64.tar.gz path: ${{ github.workspace }}/bin - - name: Untar provider binaries + merge-multiple: true + + - name: Untar pulumi-resource-xyz + shell: bash + run: | + tar -zxf ${{ github.workspace }}/bin/*amd64.tar.gz -C ${{ github.workspace}}/bin + + - name: Mark pulumi-resource-xyz as executable shell: bash run: | - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace}}/bin find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; diff --git a/.github/actions/download-tfgen/action.yml b/.github/actions/download-tfgen/action.yml new file mode 100644 index 00000000..e417e286 --- /dev/null +++ b/.github/actions/download-tfgen/action.yml @@ -0,0 +1,17 @@ +name: Download the tfgen binary +description: Downloads the tfgen binary to `bin/`. + +runs: + using: "composite" + steps: + + - name: Download pulumi-tfgen-xyz + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: pulumi-tfgen-xyz + path: ${{ github.workspace }}/bin + + - name: Ensure pulumi-tfgen-xyz is executable + shell: bash + run: | + find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; diff --git a/.github/workflows/build_sdk.yml b/.github/workflows/build_sdk.yml index 5dc07e3b..d0d9648d 100644 --- a/.github/workflows/build_sdk.yml +++ b/.github/workflows/build_sdk.yml @@ -58,8 +58,8 @@ jobs: tools: pulumictl, pulumicli, ${{ matrix.language }} - name: Prepare local workspace run: make prepare_local_workspace - - name: Download bin - uses: ./.github/actions/download-bin + - name: Download tfgen + uses: ./.github/actions/download-tfgen - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Restore makefile progress diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03c839b9..3bf9fa74 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -131,6 +131,7 @@ jobs: name: test needs: - prerequisites + - build_provider - build_sdk permissions: contents: read diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 595a6668..68b6f883 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -72,6 +72,7 @@ jobs: name: test needs: - prerequisites + - build_provider - build_sdk permissions: contents: read diff --git a/.github/workflows/prerequisites.yml b/.github/workflows/prerequisites.yml index ede61093..598ef26a 100644 --- a/.github/workflows/prerequisites.yml +++ b/.github/workflows/prerequisites.yml @@ -66,8 +66,6 @@ jobs: run: make prepare_local_workspace - name: Generate schema run: make schema - - name: Build provider binary - run: make provider - name: Unit-test provider code run: make test_provider - if: inputs.is_pr @@ -91,8 +89,12 @@ jobs: Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. - - name: Upload bin - uses: ./.github/actions/upload-bin + - name: Upload pulumi-tfgen-xyz + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: pulumi-tfgen-xyz + path: ${{ github.workspace }}/bin/pulumi-tfgen-xyz + retention-days: 30 - name: Upload schema-embed.json uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bca523e..2c9a6418 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,6 +78,7 @@ jobs: name: test needs: - prerequisites + - build_provider - build_sdk permissions: contents: read diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 967bcd75..b9153c42 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -120,6 +120,7 @@ jobs: name: test needs: - prerequisites + - build_provider - build_sdk permissions: contents: read