Fix build_and_deploy workflow (#553)

This commit is contained in:
Michael Telatyński 2023-02-27 09:52:47 +00:00 committed by GitHub
parent f79713980a
commit fc961737f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,7 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
mode: mode:
description: What type of build to trigger. Release builds should be ran from the `master` branch. description: What type of build to trigger. Release builds MUST be ran from the `master` branch.
required: true required: true
default: nightly default: nightly
type: choice type: choice
@ -15,27 +15,27 @@ on:
- nightly - nightly
- release - release
macos: macos:
description: Whether to build macOS description: Build macOS
required: true required: true
type: boolean type: boolean
default: true default: true
windows_32bit: windows_32bit:
description: Whether to build Windows 32-bit description: Build Windows 32-bit
required: true required: true
type: boolean type: boolean
default: true default: true
windows_64bit: windows_64bit:
description: Whether to build Windows 64-bit description: Build Windows 64-bit
required: true required: true
type: boolean type: boolean
default: true default: true
linux: linux:
description: Whether to build Linux description: Build Linux
required: true required: true
type: boolean type: boolean
default: true default: true
deploy: deploy:
description: Whether to deploy artifacts description: Deploy artifacts
required: true required: true
type: boolean type: boolean
default: true default: true
@ -107,6 +107,7 @@ jobs:
deploy: deploy:
needs: needs:
- macos - macos
- linux
- windows_32bit - windows_32bit
- windows_64bit - windows_64bit
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -131,7 +132,7 @@ jobs:
R2_URL: ${{ secrets.CF_R2_S3_API }} R2_URL: ${{ secrets.CF_R2_S3_API }}
- name: Deploy artifacts - name: Deploy artifacts
if: github.event_name != 'workflow_dispatch' || inputs.macos if: github.event_name != 'workflow_dispatch' || inputs.macos || inputs.windows_32bit || inputs.windows_64bit
run: | run: |
aws s3 cp --recursive packages.element.io/ s3://$R2_BUCKET/$DEPLOYMENT_DIR --endpoint-url $R2_URL --region auto aws s3 cp --recursive packages.element.io/ s3://$R2_BUCKET/$DEPLOYMENT_DIR --endpoint-url $R2_URL --region auto
env: env: