Skip to content

Commit

Permalink
CI: Allow skipping package uploads
Browse files Browse the repository at this point in the history
Add a workflow input variable to determine whether built packages should
be uploaded, which may come in useful for testing. By default, packages
are only uploaded after successful merges.
  • Loading branch information
aperezdc committed Nov 6, 2023
1 parent b86a9ea commit 98fcec5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
name: Build and Deploy
on:
workflow_dispatch:
inputs:
upload_packages:
description: 'Upload packages'
required: true
type: choice
default: on-merge
options:
- on-merge
- skip
- yes
pull_request:
types:
- opened
- synchronize
- reopened
- closed
branches:
- 'wpe-android'
Expand Down Expand Up @@ -34,6 +47,7 @@ jobs:
path: ./wpewebkit-android-${{ matrix.target }}*
if-no-files-found: error
- name: Upload packages to wpewebkit.org
if: ${{ inputs.upload_packages == 'Yes' || (github.event.pull_request.merged == true && inputs.upload_packages == 'on-merge') }}
run: |
python3 ./.github/workflows/upload.py "./wpewebkit-android-${{ matrix.target }}*" || \
echo "**:warning: WARNING :warning:** Cannot upload ./wpewebkit-android-${{ matrix.target }}... files to wpewebkit.org" >> $GITHUB_STEP_SUMMARY
Expand Down

0 comments on commit 98fcec5

Please sign in to comment.