Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Add GitHub Action to add binaries to new release #16

Merged
merged 3 commits into from
May 5, 2020

Conversation

jrhouston
Copy link
Contributor

@jrhouston jrhouston commented May 4, 2020

Adds a GitHub action to build and upload the binaries for all OS + architectures when a new semver tag is pushed - this was a manual task in the old provider.

Partly solves #9

@jrhouston jrhouston force-pushed the github-action-release-binary branch from c3604c5 to 6a94abd Compare May 4, 2020 21:32
for asset in ./release-bin/*.zip; do
assets+=("-a" "$asset")
done
hub release create "${assets[@]}" -m "${{ github.ref }}" "${{ github.ref }}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got this from here: actions/upload-release-asset#28 (comment)

Looks like there isn't an easy way to glob for assets yet.

@aareet
Copy link
Contributor

aareet commented May 4, 2020

Looks good, let's not do any work to upload to releases.hashicorp.com yet though, we don't want the alpha provider automatically appearing on the registry.

@aareet aareet self-requested a review May 4, 2020 22:16
@jrhouston
Copy link
Contributor Author

Looks good, let's not do any work to upload to releases.hashicorp.com yet though, we don't want the alpha provider automatically appearing on the registry.

Yep, that should still be handled by the regular release process when we set that up.

mkdir -p $ASSETS_DIR
rm -rf $ASSETS_DIR/*

for osarch in $OS_ARCH; do
Copy link
Member

Choose a reason for hiding this comment

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

This looks like it does exactly what it should.

For the sake of conversation, wanted to mention the gox tool.
Hashicorp projects have been using https://github.com/mitchellh/gox to implement cross-building. Gox does all the builds in parallel (depending on how many cores are available), among other things. Any pro / cons for picking one or the other?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I actually didn't know about this tool - this was just the simplest thing I could think of. I can just update the script to use this.

Copy link
Member

@alexsomesan alexsomesan left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @jrhouston !

@alexsomesan alexsomesan merged commit 5bcda13 into dev May 5, 2020
@alexsomesan alexsomesan deleted the github-action-release-binary branch May 5, 2020 17:06
@ghost
Copy link

ghost commented Jun 26, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Jun 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants