Skip to content

Commit

Permalink
WIP Label usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tytan652 committed Oct 9, 2023
1 parent d1df395 commit 64e4894
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/build-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
config: ${{ steps.setup.outputs.config }}
commitHash: ${{ steps.setup.outputs.commitHash }}
annotate: ${{ steps.setup.outputs.annotate }}
flatpakArch: ${{ steps.setup.outputs.flatpakArch }}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -29,26 +30,30 @@ jobs:
case "${GITHUB_EVENT_NAME}" in
pull_request)
config_data=('codesign:false' 'notarize:false' 'package:false' 'config:RelWithDebInfo' 'annotate:false')
config_data=('codesign:false' 'notarize:false' 'package:false' 'config:RelWithDebInfo' 'annotate:false', 'flatpakArch:["x86_64"]')
label_data=$(gh pr view ${{ github.event.number }} --json labels)
if echo "${label_data}" \
| jq -e -r '.labels[] | select(.name == "Seeking Testers")' > /dev/null; then
config_data[0]='codesign:true'
config_data[2]='package:true'
fi
if echo "${label_data}" \
| jq -e -r '.labels[] | select(.name == "Flatpak QEMU")' > /dev/null; then
config_data[5]='flatpakArch:["x86_64", "aarch64"]'
fi
;;
push)
config_data=('codesign:true' 'notarize:false' 'package:true' 'config:RelWithDebInfo' 'annotate:false')
config_data=('codesign:true' 'notarize:false' 'package:true' 'config:RelWithDebInfo' 'annotate:false', 'flatpakArch:["x86_64", "aarch64"]')
if [[ ${GITHUB_REF_NAME} =~ [0-9]+.[0-9]+.[0-9]+(-(rc|beta).+)? ]]; then
config_data[1]='notarize:true'
config_data[3]='config:Release'
fi
;;
workflow_dispatch)
config_data=('codesign:true' 'notarize:false' 'package:false' 'config:RelWithDebInfo' 'annotate:false')
config_data=('codesign:true' 'notarize:false' 'package:false' 'config:RelWithDebInfo' 'annotate:false', 'flatpakArch:["x86_64", "aarch64"]')
;;
schedule)
config_data=('codesign:true' 'notarize:false' 'package:true' 'config:RelWithDebInfo' 'annotate:true')
config_data=('codesign:true' 'notarize:false' 'package:true' 'config:RelWithDebInfo' 'annotate:true', 'flatpakArch:["x86_64", "aarch64"]')
;;
*) ;;
esac
Expand Down Expand Up @@ -258,7 +263,7 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [x86_64, aarch64]
arch: ${{ fromJson(needs.check-event.outputs.flatpakArch) }}
with:
build-bundle: ${{ fromJSON(needs.check-event.outputs.package) }}
bundle: obs-studio-flatpak-${{ needs.check-event.outputs.commitHash }}-${{ matrix.arch }}.flatpak
Expand Down

0 comments on commit 64e4894

Please sign in to comment.