Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove goreleaser #1016

Merged
merged 22 commits into from
Jul 3, 2024
Merged

Remove goreleaser #1016

merged 22 commits into from
Jul 3, 2024

Conversation

danielrbradley
Copy link
Member

@danielrbradley danielrbradley commented Jun 28, 2024

Stop using goreleaser, improve our release notes, speed up releases.

This should also save 3 hours of waiting per release of AWS.

Build cross-platform provider binaries, in parallel, straight after prerequisites, then only calculate hashes & push to S3 and GitHub releases directly during the publish job.

image

Specifics:

  • Use GitHub's own release notes generator which allows us to suppliment with our own context - specifically the schema change since the previous latest release.
  • Capture and restore the schema-embed.json to avoid having to run tfgen on every provider build.
  • Build the multi-platform build straight into the makefile for easier local testing.
  • Remove clearing disk space during publish as we're not doing any build work there any more.

This does not include reworking tests to use the the provider binary being released - but this can be added later fairly easily.

Prerelease run: https://github.com/pulumi/pulumi-xyz/actions/runs/9749848070
Stable release run: https://github.com/pulumi/pulumi-xyz/actions/runs/9750181828
Example of published release: https://github.com/pulumi/pulumi-xyz/releases/tag/v1.0.3

@danielrbradley danielrbradley self-assigned this Jun 28, 2024
@danielrbradley danielrbradley changed the base branch from master to extract-publish-workflow June 28, 2024 16:26
Base automatically changed from extract-publish-workflow to master June 28, 2024 18:22
Build a provider binary for a specific platform and zip it along with the readme and licence.
Used via the makefile during tfgen.
- We use `-C` while adding the files.
- Test using `make upstream` instead of `make tfgen`.
We're not running go builds so we shouldn't be using much disk space in this job any more.
- Set PROVIDER_VERSION for whole provider build job for the makefile calls.
- Use normalized VERSION_GENERIC instead of PROVIDER_VERSION in the makefile.
Try and work out why we're getting a message about the makefile target not existing.
- Remove unused shell option
@danielrbradley danielrbradley marked this pull request as ready for review July 1, 2024 19:47
@danielrbradley danielrbradley requested a review from a team July 1, 2024 19:47
Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I'd love to see this used end to end on a provider before we roll it out to the entire fleet.

Comment on lines +79 to +88
uses: softprops/action-gh-release@v1
if: inputs.isPrerelease == false
uses: #{{ .Config.actionVersions.goReleaser }}#
env:
GORELEASER_CURRENT_TAG: v${{ inputs.version }}
PROVIDER_VERSION: ${{ inputs.version }}
with:
args: -p #{{ .Config.parallel }}# release --rm-dist --timeout #{{ .Config.timeout }}#m0s
version: latest
- name: Run GoReleaser (prerelease)
if: inputs.isPrerelease == true
uses: #{{ .Config.actionVersions.goReleaser }}#
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/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does using this action give us anything over gh release create? If not, should we just use the CLI command to avoid the indirection of a 3rd party action?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly just easier to integrate with options and better output. Using the CLI would be a little awkward to conditionally include the --draft and --prerelease flags.

Copy link
Contributor

@flostadler flostadler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - just one small question

@danielrbradley
Copy link
Member Author

danielrbradley commented Jul 2, 2024

This looks good to me. I'd love to see this used end to end on a provider before we roll it out to the entire fleet.

pulumi-kafka main run: https://github.com/pulumi/pulumi-kafka/actions/runs/9757616987
pulumi-azure main run: https://github.com/pulumi/pulumi-azure/actions/runs/9758241530
pulumi-azure release run: https://github.com/pulumi/pulumi-azure/actions/runs/9777470165
pulumi-azure release notes: https://github.com/pulumi/pulumi-azure/releases/tag/v5.82.0

@danielrbradley danielrbradley merged commit e869944 into master Jul 3, 2024
5 checks passed
@danielrbradley danielrbradley deleted the remove-goreleaser branch July 3, 2024 13:02
@mjeffryes mjeffryes added this to the 0.107 milestone Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release changelog is missing Hook failures in goreleaser
5 participants