From 62d16b3b9f1a178c22669a9cc6d00a99af9700d8 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Tue, 26 Jul 2022 11:38:41 -0700 Subject: [PATCH] Build and store the binary on non-release builds --- .ci/build.sh | 10 ++++++++++ .github/workflows/build.yml | 10 +++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.ci/build.sh b/.ci/build.sh index 349bafb77..df4f97502 100755 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -16,5 +16,15 @@ wrap gem build *.gemspec \ g=(vagrant*.gem) gem=$(printf "%s" "${g}") +# Store the gem asset wrap aws s3 cp "${gem}" "${ASSETS_PRIVATE_BUCKET}/${repository}/vagrant-main.gem" \ "Failed to store Vagrant RubyGem main build" + +# Build our binary +wrap make \ + "Failed to build the Vagrant go binary" +wrap zip vagrant-go vagrant-go \ + "Failed to compress go binary" + +# Store the binary asset +wrap aws s3 cp vagrant-go.zip "${ASSETS_PRIVATE_BUCKET}/${repository}/vagrant-go-main.zip" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02aa10aca..16955c4f3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,11 +14,15 @@ jobs: steps: - name: Code Checkout uses: actions/checkout@v1 - - name: Set Ruby + - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '2.6' - - name: Build RubyGem + ruby-version: '2.7' + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: '>=1.17.11' + - name: Build RubyGem and binary run: ./.ci/build.sh working-directory: ${{github.workspace}} env: