From 62d72ed47be2683b05fa2eaa4df3c9a7b40d5a14 Mon Sep 17 00:00:00 2001 From: Pulumi Bot Date: Thu, 27 Jun 2024 20:12:31 +0000 Subject: [PATCH] [internal] Update GitHub Actions workflow files --- .github/actions/download-bin/action.yml | 16 ++ .github/actions/download-sdk/action.yml | 19 +++ .github/actions/upload-bin/action.yml | 15 ++ .github/actions/upload-sdk/action.yml | 20 +++ .github/workflows/build_sdk.yml | 23 +-- .github/workflows/master.yml | 80 ++-------- .github/workflows/prerelease.yml | 121 ++------------- .github/workflows/prerequisites.yml | 12 +- .github/workflows/publish.yml | 172 +++++++++++++++++++++ .github/workflows/release.yml | 152 ++---------------- .github/workflows/run-acceptance-tests.yml | 21 +-- .github/workflows/verify-release.yml | 5 + 12 files changed, 288 insertions(+), 368 deletions(-) create mode 100644 .github/actions/download-bin/action.yml create mode 100644 .github/actions/download-sdk/action.yml create mode 100644 .github/actions/upload-bin/action.yml create mode 100644 .github/actions/upload-sdk/action.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/actions/download-bin/action.yml b/.github/actions/download-bin/action.yml new file mode 100644 index 00000000..5477309e --- /dev/null +++ b/.github/actions/download-bin/action.yml @@ -0,0 +1,16 @@ +name: Download binary assets +description: Downloads the provider and tfgen binaries to `bin/`. + +runs: + using: "composite" + steps: + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: xyz-provider.tar.gz + path: ${{ github.workspace }}/bin + - name: Untar provider binaries + 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-sdk/action.yml b/.github/actions/download-sdk/action.yml new file mode 100644 index 00000000..1fd54841 --- /dev/null +++ b/.github/actions/download-sdk/action.yml @@ -0,0 +1,19 @@ +name: Download SDK asset +description: Restores the SDK asset for a language. + +inputs: + language: + required: true + description: One of nodejs, python, dotnet, go, java + +runs: + using: "composite" + steps: + - name: Download ${{ inputs.language }} SDK + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress SDK folder + shell: bash + run: tar -zxf ${{ github.workspace }}/sdk/${{ inputs.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ inputs.language }} diff --git a/.github/actions/upload-bin/action.yml b/.github/actions/upload-bin/action.yml new file mode 100644 index 00000000..2a5d815a --- /dev/null +++ b/.github/actions/upload-bin/action.yml @@ -0,0 +1,15 @@ +name: Upload bin assets +description: Uploads the provider and tfgen binaries to `bin/`. + +runs: + using: "composite" + steps: + - name: Tar provider binaries + shell: bash + run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-xyz pulumi-tfgen-xyz + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: xyz-provider.tar.gz + path: ${{ github.workspace }}/bin/provider.tar.gz + retention-days: 30 diff --git a/.github/actions/upload-sdk/action.yml b/.github/actions/upload-sdk/action.yml new file mode 100644 index 00000000..77d48494 --- /dev/null +++ b/.github/actions/upload-sdk/action.yml @@ -0,0 +1,20 @@ +name: Upload SDK asset +description: Upload the SDK for a specific language as an asset for the workflow. + +inputs: + language: + required: true + description: One of nodejs, python, dotnet, go, java + +runs: + using: "composite" + steps: + - name: Compress SDK folder + shell: bash + run: tar -zcf sdk/${{ inputs.language }}.tar.gz -C sdk/${{ inputs.language }} . + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz + retention-days: 30 diff --git a/.github/workflows/build_sdk.yml b/.github/workflows/build_sdk.yml index 4ffc4be0..34f49db3 100644 --- a/.github/workflows/build_sdk.yml +++ b/.github/workflows/build_sdk.yml @@ -54,17 +54,8 @@ jobs: uses: ./.github/actions/setup-tools with: tools: pulumictl, pulumicli, go, node, dotnet, python, java - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: xyz-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; + - name: Download bin + uses: ./.github/actions/download-bin - name: Install plugins run: make install_plugins - name: Update path @@ -80,11 +71,7 @@ jobs: sdk/go/**/pulumiUtilities.go sdk/nodejs/package.json sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 + - name: Upload SDK + uses: ./.github/actions/upload-sdk with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 + language: ${{ matrix.language }} diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 35d3547c..730dd330 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -89,61 +89,15 @@ jobs: - prerequisites - test - license_check - runs-on: ubuntu-latest - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@v1.3.1 - with: - # this might remove tools that are actually needed, - # if set to "true" but frees about 6 GB - tool-cache: false - swap-storage: false - - name: Checkout Repo - uses: actions/checkout@v4 - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumicli, go - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-region: us-east-2 - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - role-duration-seconds: 7200 - role-external-id: upload-pulumi-release - role-session-name: xyz@githubActions - role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 - env: - GORELEASER_CURRENT_TAG: v${{ needs.prerequisites.outputs.version }} - PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} - with: - args: -p 3 -f .goreleaser.prerelease.yml --rm-dist --skip-validate --timeout - 60m0s - version: latest - - publish_sdk: - name: publish_sdk - needs: - - prerequisites - - publish - runs-on: ubuntu-latest - steps: - - name: Publish SDKs - uses: pulumi/pulumi-package-publisher@v0.0.18 - with: - sdk: all - version: ${{ needs.prerequisites.outputs.version }} - dotnet-version: "6.0.x" - java-version: "11" - node-version: "20.x" - python-version: "3.11.8" + uses: ./.github/workflows/publish.yml + secrets: inherit + with: + version: ${{ needs.prerequisites.outputs.version }} + isPrerelease: false tag_release_if_labeled_needs_release: name: Tag release if labeled as needs-release - needs: publish_sdk + needs: publish runs-on: ubuntu-latest steps: - name: check if this commit needs release @@ -176,26 +130,13 @@ jobs: uses: ./.github/actions/setup-tools with: tools: pulumictl, pulumicli, go, node, dotnet, python, java - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: xyz-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; + - name: Download bin + uses: ./.github/actions/download-bin - run: dotnet nuget add source ${{ github.workspace }}/nuget - name: Download SDK - uses: actions/download-artifact@v4 + uses: ./.github/actions/download-sdk with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress SDK folder - run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ - github.workspace }}/sdk/${{ matrix.language }} + language: ${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps @@ -223,6 +164,7 @@ jobs: - java name: master on: + workflow_dispatch: {} push: branches: - master diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index fd7f5bad..e9a7784d 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -52,87 +52,12 @@ jobs: - prerequisites - test - license_check - runs-on: ubuntu-latest - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@v1.3.1 - with: - # this might remove tools that are actually needed, - # if set to "true" but frees about 6 GB - tool-cache: false - swap-storage: false - - name: Checkout Repo - uses: actions/checkout@v4 - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumicli, go - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-region: us-east-2 - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - role-duration-seconds: 7200 - role-external-id: upload-pulumi-release - role-session-name: xyz@githubActions - role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 - env: - GORELEASER_CURRENT_TAG: v${{ needs.prerequisites.outputs.version }} - PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} - with: - args: -p 3 -f .goreleaser.prerelease.yml --rm-dist --skip-validate --timeout - 60m0s - version: latest - publish_sdk: - name: publish_sdk - needs: - - prerequisites - - publish - runs-on: ubuntu-latest - steps: - - name: Publish SDKs - uses: pulumi/pulumi-package-publisher@v0.0.18 - with: - sdk: all - version: ${{ needs.prerequisites.outputs.version }} - dotnet-version: "6.0.x" - java-version: "11" - node-version: "20.x" - python-version: "3.11.8" - publish_go_sdk: - name: publish_go_sdk - needs: - - prerequisites - - publish_sdk - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - name: Download Go SDK - uses: actions/download-artifact@v4 - with: - name: go-sdk.tar.gz - path: ${{ github.workspace }}/sdk/ - - name: Uncompress Go SDK - run: tar -zxf ${{ github.workspace }}/sdk/go.tar.gz -C - ${{ github.workspace }}/sdk/go - shell: bash - - uses: pulumi/publish-go-sdk-action@v1 - with: - repository: ${{ github.repository }} - base-ref: ${{ github.sha }} - source: sdk - path: sdk - version: ${{ needs.prerequisites.outputs.version }} - additive: false - # Avoid including other language SDKs & artifacts in the commit - files: | - go.* - go/** - !*.tar.gz + uses: ./.github/workflows/publish.yml + secrets: inherit + with: + version: ${{ needs.prerequisites.outputs.version }} + isPrerelease: true + test: name: test needs: @@ -151,26 +76,13 @@ jobs: uses: ./.github/actions/setup-tools with: tools: pulumictl, pulumicli, go, node, dotnet, python, java - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: xyz-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; + - name: Download bin + uses: ./.github/actions/download-bin - run: dotnet nuget add source ${{ github.workspace }}/nuget - name: Download SDK - uses: actions/download-artifact@v4 + uses: ./.github/actions/download-sdk with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress SDK folder - run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ - github.workspace }}/sdk/${{ matrix.language }} + language: ${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps @@ -196,19 +108,6 @@ jobs: - dotnet - go - java - verify-release: - name: verify-release - needs: - - prerequisites - - publish - - publish_sdk - - publish_go_sdk - uses: ./.github/workflows/verify-release.yml - secrets: inherit - with: - providerVersion: ${{ needs.prerequisites.outputs.version }} - # Prelease is run often but we only have 5 concurrent macos runners, so we only test after the stable release. - enableMacosRunner: false name: prerelease on: diff --git a/.github/workflows/prerequisites.yml b/.github/workflows/prerequisites.yml index 0d6efe71..97c3608a 100644 --- a/.github/workflows/prerequisites.yml +++ b/.github/workflows/prerequisites.yml @@ -93,13 +93,5 @@ 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: Tar provider binaries - run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace }}/bin/ pulumi-resource-xyz - pulumi-tfgen-xyz - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: xyz-provider.tar.gz - path: ${{ github.workspace }}/bin/provider.tar.gz - retention-days: 30 + - name: Upload bin + uses: ./.github/actions/upload-bin diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..c1f24bb4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,172 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt +name: Publish + +on: + workflow_call: + inputs: + version: + required: true + type: string + isPrerelease: + required: true + type: boolean + skipGoSdk: + default: false + type: boolean + description: Skip publishing & verifying the Go SDK + +env: + IS_PRERELEASE: ${{ inputs.isPrerelease }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_API: https://api.pulumi-staging.io + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. + PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + PULUMI_MISSING_DOCS_ERROR: true + PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + PYPI_USERNAME: __token__ + SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} + SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} + SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} + TF_APPEND_USER_AGENT: pulumi + XYZ_REGION: us-west-2 + +jobs: + publish: + name: publish + runs-on: ubuntu-latest + steps: + - name: Validate inputs + if: inputs.skipGoSdk && inputs.isPrerelease == false + run: echo "Can't skip Go SDK for stable releases. This is likely a bug in the calling workflow." && exit 1 + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@v1.3.1 + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + swap-storage: false + - name: Checkout Repo + uses: actions/checkout@v4 + - name: Setup tools + uses: ./.github/actions/setup-tools + with: + tools: pulumictl, pulumicli, go + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-region: us-east-2 + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + role-duration-seconds: 7200 + role-external-id: upload-pulumi-release + role-session-name: xyz@githubActions + role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} + - name: Run GoReleaser + if: inputs.isPrerelease == false + uses: goreleaser/goreleaser-action@v5 + env: + GORELEASER_CURRENT_TAG: v${{ inputs.version }} + PROVIDER_VERSION: ${{ inputs.version }} + with: + args: -p 3 release --rm-dist --timeout 60m0s + version: latest + - name: Run GoReleaser (prerelease) + if: inputs.isPrerelease == true + uses: goreleaser/goreleaser-action@v5 + env: + GORELEASER_CURRENT_TAG: v${{ inputs.version }} + PROVIDER_VERSION: ${{ inputs.version }} + with: + args: -p 3 -f .goreleaser.prerelease.yml --rm-dist --skip-validate --timeout + 60m0s + version: latest + + publish_sdk: + name: publish_sdk + needs: publish + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - name: Setup tools + uses: ./.github/actions/setup-tools + with: + tools: pulumictl, pulumicli, go, node, dotnet, python, java + - name: Publish SDKs + uses: pulumi/pulumi-package-publisher@v0.0.19 + with: + sdk: all + version: ${{ inputs.version }} + - name: Download Go SDK + uses: ./.github/actions/download-sdk + with: + language: go + - uses: pulumi/publish-go-sdk-action@v1 + if: inputs.skipGoSdk == false + with: + repository: ${{ github.repository }} + base-ref: ${{ github.sha }} + source: sdk + path: sdk + version: ${{ inputs.version }} + additive: false + # Avoid including other language SDKs & artifacts in the commit + files: | + go.* + go/** + !*.tar.gz + create_docs_build: + name: create_docs_build + needs: publish_sdk + # Only run for non-prerelease, if the publish_go_sdk job was successful or skipped + if: inputs.isPrerelease == false + runs-on: ubuntu-latest + steps: + - name: Dispatch Metadata build + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.PULUMI_BOT_TOKEN }} + repository: pulumi/registry + event-type: resource-provider + client-payload: |- + { + "project": "${{ github.repository }}", + "project-shortname": "xyz", + "ref": "${{ github.ref_name }}" + } + + clean_up_release_labels: + name: Clean up release labels + # Only run for non-prerelease, if the publish_go_sdk job was successful or skipped + if: inputs.isPrerelease == false + needs: create_docs_build + + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - name: Clean up release labels + uses: pulumi/action-release-by-pr-label@main + with: + command: "clean-up-release-labels" + repo: ${{ github.repository }} + commit: ${{ github.sha }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + verify_release: + name: verify_release + needs: publish_sdk + uses: ./.github/workflows/verify-release.yml + secrets: inherit + with: + providerVersion: ${{ inputs.version }} + # Prelease is run often but we only have 5 concurrent macos runners, so we only test after the stable release. + enableMacosRunner: ${{ inputs.isPrerelease == false }} + skipGoSdk: ${{ inputs.skipGoSdk }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7e5b13e..f8b53da9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,23 +36,6 @@ jobs: with: version: ${{ needs.prerequisites.outputs.version }} - create_docs_build: - name: create_docs_build - needs: publish_go_sdk - runs-on: ubuntu-latest - steps: - - name: Dispatch Metadata build - uses: peter-evans/repository-dispatch@v3 - with: - token: ${{ secrets.PULUMI_BOT_TOKEN }} - repository: pulumi/registry - event-type: resource-provider - client-payload: |- - { - "project": "${{ github.repository }}", - "project-shortname": "xyz", - "ref": "${{ github.ref_name }}" - } lint: name: lint uses: ./.github/workflows/lint.yml @@ -68,103 +51,11 @@ jobs: - prerequisites - test - license_check - runs-on: ubuntu-latest - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@v1.3.1 - with: - # this might remove tools that are actually needed, - # if set to "true" but frees about 6 GB - tool-cache: false - swap-storage: false - - name: Checkout Repo - uses: actions/checkout@v4 - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumicli, go - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-region: us-east-2 - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - role-duration-seconds: 7200 - role-external-id: upload-pulumi-release - role-session-name: xyz@githubActions - role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 - env: - GORELEASER_CURRENT_TAG: v${{ needs.prerequisites.outputs.version }} - PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} - with: - args: -p 3 release --rm-dist --timeout 60m0s - version: latest - publish_sdk: - name: publish_sdk - needs: - - prerequisites - - publish - runs-on: ubuntu-latest - steps: - - name: Publish SDKs - uses: pulumi/pulumi-package-publisher@v0.0.18 - with: - sdk: all - version: ${{ needs.prerequisites.outputs.version }} - dotnet-version: "6.0.x" - java-version: "11" - node-version: "20.x" - python-version: "3.11.8" - publish_go_sdk: - name: publish_go_sdk - needs: - - prerequisites - - publish_sdk - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - name: Download Go SDK - uses: actions/download-artifact@v4 - with: - name: go-sdk.tar.gz - path: ${{ github.workspace }}/sdk/ - - name: Uncompress Go SDK - run: tar -zxf ${{ github.workspace }}/sdk/go.tar.gz -C - ${{ github.workspace }}/sdk/go - shell: bash - - uses: pulumi/publish-go-sdk-action@v1 - with: - repository: ${{ github.repository }} - base-ref: ${{ github.sha }} - source: sdk - path: sdk - version: ${{ needs.prerequisites.outputs.version }} - additive: false - # Avoid including other language SDKs & artifacts in the commit - files: | - go.* - go/** - !*.tar.gz - - clean_up_release_labels: - name: Clean up release labels - needs: create_docs_build - - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - name: Clean up release labels - uses: pulumi/action-release-by-pr-label@main - with: - command: "clean-up-release-labels" - repo: ${{ github.repository }} - commit: ${{ github.sha }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: ./.github/workflows/publish.yml + secrets: inherit + with: + version: ${{ needs.prerequisites.outputs.version }} + isPrerelease: false test: name: test @@ -184,26 +75,13 @@ jobs: uses: ./.github/actions/setup-tools with: tools: pulumictl, pulumicli, go, node, dotnet, python, java - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: xyz-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; + - name: Download bin + uses: ./.github/actions/download-bin - run: dotnet nuget add source ${{ github.workspace }}/nuget - name: Download SDK - uses: actions/download-artifact@v4 + uses: ./.github/actions/download-sdk with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress SDK folder - run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ - github.workspace }}/sdk/${{ matrix.language }} + language: ${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps @@ -229,18 +107,6 @@ jobs: - dotnet - go - java - verify-release: - name: verify-release - needs: - - prerequisites - - publish - - publish_sdk - - publish_go_sdk - uses: ./.github/workflows/verify-release.yml - secrets: inherit - with: - providerVersion: ${{ needs.prerequisites.outputs.version }} - enableMacosRunner: true name: release on: diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 84ecbc9f..597f6a10 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -117,26 +117,13 @@ jobs: uses: ./.github/actions/setup-tools with: tools: pulumictl, pulumicli, go, node, dotnet, python, java - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: xyz-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; + - name: Download bin + uses: ./.github/actions/download-bin - run: dotnet nuget add source ${{ github.workspace }}/nuget - name: Download SDK - uses: actions/download-artifact@v4 + uses: ./.github/actions/download-sdk with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress SDK folder - run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ - github.workspace }}/sdk/${{ matrix.language }} + language: ${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps diff --git a/.github/workflows/verify-release.yml b/.github/workflows/verify-release.yml index d46da545..d89876b5 100644 --- a/.github/workflows/verify-release.yml +++ b/.github/workflows/verify-release.yml @@ -22,6 +22,11 @@ on: required: false type: boolean default: false + skipGoSdk: + description: "Skip the Go SDK verification. Defaults to 'false'. This is used when we're not publishing a Go SDK on the default branch build." + required: false + type: boolean + default: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}