Merge pull request #326 from hashicorp/release-updates

Release updates for vagrant-agogo
This commit is contained in:
Chris Roberts 2022-07-27 13:22:39 -07:00 committed by GitHub
commit 6aa63e309a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 7 deletions

View File

@ -16,5 +16,15 @@ wrap gem build *.gemspec \
g=(vagrant*.gem) g=(vagrant*.gem)
gem=$(printf "%s" "${g}") gem=$(printf "%s" "${g}")
# Store the gem asset
wrap aws s3 cp "${gem}" "${ASSETS_PRIVATE_BUCKET}/${repository}/vagrant-main.gem" \ wrap aws s3 cp "${gem}" "${ASSETS_PRIVATE_BUCKET}/${repository}/vagrant-main.gem" \
"Failed to store Vagrant RubyGem main build" "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"

View File

@ -35,6 +35,23 @@ gem=$(printf "%s" "${g}")
vagrant_version="$(gem specification "${gem}" version)" vagrant_version="$(gem specification "${gem}" version)"
vagrant_version="${vagrant_version##*version: }" vagrant_version="${vagrant_version##*version: }"
# Build the go binary
wrap make \
"Failed to build the Vagrant go binary"
wrap mv vagrant vagrant-go \
"Failed to rename Vagrant go binary"
wrap zip vagrant-go vagrant-go \
"Failed to compress go binary"
wrap mkdir release-assets \
"Failed to create release assets directory"
wrap mv vagrant*.gem release-assets \
"Failed to move Vagrant RubyGem asset to release asset directory"
wrap mv vagrant-go.zip release-assets \
"Failed to move Vagrant go asset to release asset directory"
# We want to release into the builders repository so # We want to release into the builders repository so
# update the repository variable with the desired destination # update the repository variable with the desired destination
repo_owner="${target_owner}" repo_owner="${target_owner}"
@ -46,7 +63,7 @@ export GITHUB_TOKEN="${HASHIBOT_TOKEN}"
if [ "${tag}" = "" ]; then if [ "${tag}" = "" ]; then
echo "Generating Vagrant RubyGem pre-release... " echo "Generating Vagrant RubyGem pre-release... "
version="v${vagrant_version}+${short_sha}" version="v${vagrant_version}+${short_sha}"
prerelease "${version}" "${gem}" prerelease "${version}" ./release-assets
else else
# Validate this is a proper release version # Validate this is a proper release version
valid_release_version "${vagrant_version}" valid_release_version "${vagrant_version}"
@ -56,7 +73,7 @@ else
echo "Generating Vagrant RubyGem release... " echo "Generating Vagrant RubyGem release... "
version="v${vagrant_version}" version="v${vagrant_version}"
release "${version}" "${gem}" release "${version}" ./release-assets
fi fi
slack -m "New Vagrant installers release triggered: *${version}*" slack -m "New Vagrant installers release triggered: *${version}*"

View File

@ -14,11 +14,15 @@ jobs:
steps: steps:
- name: Code Checkout - name: Code Checkout
uses: actions/checkout@v1 uses: actions/checkout@v1
- name: Set Ruby - name: Setup Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: '2.6' ruby-version: '2.7'
- name: Build RubyGem - name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '>=1.17.11'
- name: Build RubyGem and binary
run: ./.ci/build.sh run: ./.ci/build.sh
working-directory: ${{github.workspace}} working-directory: ${{github.workspace}}
env: env:

View File

@ -14,10 +14,14 @@ jobs:
steps: steps:
- name: Code Checkout - name: Code Checkout
uses: actions/checkout@v1 uses: actions/checkout@v1
- name: Set Ruby - name: Setup Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: '2.6' ruby-version: '2.7'
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '>=1.17.11'
- name: Create Builders Release - name: Create Builders Release
run: ./.ci/release.sh run: ./.ci/release.sh
working-directory: ${{github.workspace}} working-directory: ${{github.workspace}}