build: fixes whitespace bug in upload condition, refactors

This commit is contained in:
Joe Bryan 2022-05-23 12:35:17 -04:00
parent 2eac09e42d
commit f81d7b350a

View File

@ -68,7 +68,7 @@ on:
type: boolean type: boolean
env: env:
DO_UPLOAD: > DO_UPLOAD: >-
${{ ${{
inputs.upload || inputs.upload ||
(github.ref_name == 'next/vere' && github.ref_type == 'branch') (github.ref_name == 'next/vere' && github.ref_type == 'branch')
@ -112,7 +112,7 @@ jobs:
>> $GITHUB_ENV >> $GITHUB_ENV
- uses: google-github-actions/setup-gcloud@v0.2.0 - uses: google-github-actions/setup-gcloud@v0.2.0
if: ${{ env.DO_UPLOAD == 'true' }} if: env.DO_UPLOAD == 'true'
with: with:
version: '290.0.1' version: '290.0.1'
service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }} service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}
@ -120,7 +120,7 @@ jobs:
export_default_credentials: true export_default_credentials: true
- name: upload binary to bootstrap.urbit.org - name: upload binary to bootstrap.urbit.org
if: ${{ env.DO_UPLOAD == 'true' }} if: env.DO_UPLOAD == 'true'
run: | run: |
version="$(cat ./pkg/urbit/version)" version="$(cat ./pkg/urbit/version)"
system="$(nix-instantiate --eval --expr 'builtins.currentSystem')" system="$(nix-instantiate --eval --expr 'builtins.currentSystem')"
@ -168,12 +168,12 @@ jobs:
http://localhost:12321 http://localhost:12321
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
if: ${{ env.DO_UPLOAD == 'true' }} if: env.DO_UPLOAD == 'true'
with: with:
python-version: 3.7 python-version: 3.7
- uses: google-github-actions/setup-gcloud@v0.6.0 - uses: google-github-actions/setup-gcloud@v0.6.0
if: ${{ env.DO_UPLOAD == 'true' }} if: env.DO_UPLOAD == 'true'
env: env:
# see https://github.com/google-github-actions/setup-gcloud/issues/100 # see https://github.com/google-github-actions/setup-gcloud/issues/100
CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe
@ -183,7 +183,7 @@ jobs:
export_default_credentials: true export_default_credentials: true
- name: upload binary to bootstrap.urbit.org - name: upload binary to bootstrap.urbit.org
if: ${{ env.DO_UPLOAD == 'true' }} if: env.DO_UPLOAD == 'true'
env: env:
CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe
shell: bash shell: bash