From a8ad8bace79ab722d398c768aff20a83326f2e45 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Mon, 28 Aug 2023 15:37:09 +0200 Subject: [PATCH] CI: Add build annotation step to macOS arm64 builds --- .github/workflows/build-project.yaml | 20 +++++++++++++++----- .github/workflows/scheduled.yaml | 6 +++++- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-project.yaml b/.github/workflows/build-project.yaml index d0a52d696..76464d644 100644 --- a/.github/workflows/build-project.yaml +++ b/.github/workflows/build-project.yaml @@ -14,6 +14,7 @@ jobs: notarize: ${{ steps.setup.outputs.notarize }} config: ${{ steps.setup.outputs.config }} commitHash: ${{ steps.setup.outputs.commitHash }} + annotate: ${{ steps.setup.outputs.annotate }} steps: - uses: actions/checkout@v3 with: @@ -28,25 +29,26 @@ jobs: case "${GITHUB_EVENT_NAME}" in pull_request) - config_data=('codesign:false' 'notarize:false' 'package:false' 'config:RelWithDebInfo') - if gh pr view ${{ github.event.number }} --json labels \ + config_data=('codesign:false' 'notarize:false' 'package:false' 'config:RelWithDebInfo' 'annotate:false') + 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 ;; push) - config_data=('codesign:true' 'notarize:false' 'package:true' 'config:RelWithDebInfo') + config_data=('codesign:true' 'notarize:false' 'package:true' 'config:RelWithDebInfo' 'annotate:false') 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') + config_data=('codesign:true' 'notarize:false' 'package:false' 'config:RelWithDebInfo' 'annotate:false') ;; schedule) - config_data=('codesign:true' 'notarize:false' 'package:true' 'config:RelWithDebInfo') + config_data=('codesign:true' 'notarize:false' 'package:true' 'config:RelWithDebInfo' 'annotate:true') ;; *) ;; esac @@ -153,6 +155,14 @@ jobs: codesignUser: ${{ secrets.MACOS_NOTARIZATION_USERNAME }} codesignPass: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }} + - name: Annotate Build 🏷️ + if: matrix.target == 'arm64' && fromJSON(needs.check-event.outputs.annotate) + uses: yuzutech/annotations-action@v0.4.0 + with: + repo-token: ${{ github.token }} + title: Clang Compiler + input: ${{ github.workspace }}/build_issues.json + - name: Upload Artifacts 📡 uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/scheduled.yaml b/.github/workflows/scheduled.yaml index 9f2381c2d..ca5aa5a35 100644 --- a/.github/workflows/scheduled.yaml +++ b/.github/workflows/scheduled.yaml @@ -4,7 +4,8 @@ on: schedule: - cron: 17 0 * * * permissions: - contents: write + contents: read + checks: write concurrency: group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}' cancel-in-progress: true @@ -85,6 +86,9 @@ jobs: uses: ./.github/workflows/build-project.yaml needs: cache-cleanup secrets: inherit + permissions: + contents: read + checks: write upload-language-files: name: Upload Language Files 🌐