Skip to content

Commit a4740be

Browse files
authored
ci: fix go sdk publish to embed version (#1323)
Follows the workflow defined in ci-mgmt (https://github.com/pulumi/ci-mgmt/blob/7c1f0521b8f04aff46732c6656659c85d60fd9c4/provider-ci/test-workflows/aws/.github/workflows/release.yml#L149-L186) as the basis for this change. This ensures that during the publishing step, we download the Go SDK artifact which contains the correctly embedded version. We then use the `pulumi/publish-go-sdk-action` action to commit/push the new files and cut a new sdk tag for this. Fixes: #1322
1 parent 66c426b commit a4740be

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,28 @@ jobs:
344344
uses: jaxxstorm/[email protected]
345345
with:
346346
repo: pulumi/pulumictl
347-
- name: Add SDK version tag
348-
run: git tag "sdk/v$PROVIDER_VERSION" && git push origin
349-
"sdk/v$PROVIDER_VERSION"
347+
- name: Download Go SDK
348+
uses: actions/download-artifact@v4
349+
with:
350+
name: go-sdk.tar.gz
351+
path: $${{ github.workspace }}/sdk/
352+
- name: Uncompress Go SDK
353+
run: tar -zxf ${{ github.workspace }}/sdk/go.tar.gz -C
354+
${{ github.workspace }}/sdk/go
355+
shell: bash
356+
- uses: pulumi/publish-go-sdk-action@v1
357+
with:
358+
repository: ${{ github.repository }}
359+
base-ref: ${{ github.sha }}
360+
source: sdk
361+
path: sdk
362+
version: ${{ needs.version.outputs.version }}
363+
additive: false
364+
# Avoid including other language SDKs & artifacts in the commit
365+
files: |
366+
go.*
367+
go/**
368+
!*.tar.gz
350369
create_docs_build:
351370
name: Create docs build
352371
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)