generated from pulumi/pulumi-tf-provider-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[internal] Update GitHub Actions workflow files (#266)
- Loading branch information
1 parent
1d6f516
commit 15012b9
Showing
9 changed files
with
26 additions
and
171 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,12 +47,19 @@ jobs: | |
- name: Validate skipGoSdk | ||
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/[email protected] | ||
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, schema-tools | ||
tools: pulumictl, pulumicli, go | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
|
@@ -63,44 +70,25 @@ jobs: | |
role-external-id: upload-pulumi-release | ||
role-session-name: xyz@githubActions | ||
role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} | ||
- name: Create dist directory | ||
run: mkdir -p dist | ||
- name: Download provider assets | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: pulumi-resource-xyz-v${{ inputs.version }}-* | ||
path: dist | ||
# Don't create a directory for each artifact | ||
merge-multiple: true | ||
- name: Calculate checksums | ||
working-directory: dist | ||
run: shasum ./*.tar.gz > pulumi-xyz_${{ inputs.version }}_checksums.txt | ||
- name: Get Schema Change Summary | ||
id: schema-summary | ||
shell: bash | ||
run: | | ||
# Get latest stable release. Return only first column from result (tag). | ||
LAST_VERSION=$(gh release view --repo pulumi/pulumi-xyz --json tagName -q .tagName) | ||
{ | ||
echo 'summary<<EOF' | ||
schema-tools compare --provider="xyz" --old-commit="$LAST_VERSION" --new-commit="--local-path=provider/cmd/pulumi-resource-xyz/schema.json" | ||
echo 'EOF' | ||
} >> "$GITHUB_OUTPUT" | ||
- name: Upload Provider Binaries | ||
run: aws s3 cp dist s3://get.pulumi.com/releases/plugins/ --recursive | ||
- name: Create GH Release | ||
uses: softprops/action-gh-release@v1 | ||
- name: Run GoReleaser | ||
if: inputs.isPrerelease == false | ||
uses: goreleaser/goreleaser-action@v5 | ||
env: | ||
GORELEASER_CURRENT_TAG: v${{ inputs.version }} | ||
PROVIDER_VERSION: ${{ inputs.version }} | ||
with: | ||
tag_name: v${{ inputs.version }} | ||
prerelease: ${{ inputs.isPrerelease }} | ||
# We keep pre-releases as drafts so they're not visible until we manually publish them. | ||
draft: ${{ inputs.isPrerelease }} | ||
body: ${{ steps.schema-summary.outputs.summary }} | ||
generate_release_notes: true | ||
files: dist/* | ||
args: -p 3 release --rm-dist --timeout 60m0s | ||
version: latest | ||
- name: Run GoReleaser (prerelease) | ||
if: inputs.isPrerelease == true | ||
uses: goreleaser/goreleaser-action@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters