build: upload windows binaries directly to gcp

This commit is contained in:
Joe Bryan 2022-05-20 17:14:46 -04:00
parent 9e0bbbedef
commit e13e04f2ac

View File

@ -153,3 +153,36 @@ jobs:
- run: mingw32-make build/urbit
- run: build/urbit -l -d -B ../../bin/solid.pill -F bus && curl -f --data '{"source":{"dojo":"+hood/exit"},"sink":{"app":"hood"}}' http://localhost:12321
- uses: actions/setup-python@v2
if: ${{ env.DO_UPLOAD == 'true' }}
with:
python-version: 3.7
- uses: google-github-actions/setup-gcloud@v0.6.0
if: ${{ env.DO_UPLOAD == 'true' }}
env:
# see https://github.com/google-github-actions/setup-gcloud/issues/100
CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe
with:
service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}
project_id: ${{ secrets.GCS_PROJECT }}
export_default_credentials: true
- name: upload binary to bootstrap.urbit.org
if: ${{ env.DO_UPLOAD == 'true' }}
env:
CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe
shell: bash
run: |
version="$(cat ./version)"
system="x86_64-windows"
target="gs://bootstrap.urbit.org/ci/vere/often/${GITHUB_SHA:0:9}/vere-v${version}-${system}.exe"
gsutil cp -n ./build/urbit.exe "$target"
exitcode=$?
test $exitcode -eq 0 &&
echo "upload to $target complete." ||
echo "upload to $target failed.";
exit $exitcode