From f8ced39faa405f9d148dd072c2f288160f2b4b03 Mon Sep 17 00:00:00 2001 From: Pierre-Francois Huillet Date: Wed, 1 Oct 2025 15:24:49 +0200 Subject: [PATCH 1/4] Refactor GitHub Actions workflows: update build and release steps to use specific action versions and improve clarity --- .github/workflows/build.yml | 33 ++++--------------------- .github/workflows/release.yml | 46 ++++++++++++----------------------- 2 files changed, 20 insertions(+), 59 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 164980c..5fa8898 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ windows-latest,macos-latest] + os: [ macOS,Windows] runs-on: ${{ matrix.os }} @@ -34,32 +34,9 @@ jobs: lfs: true # Disabling shallow clone is recommended for improving relevancy of reporting fetch-depth: 0 - - - - name: Checkout build4d-action - uses: actions/checkout@v5 - with: - repository: 4d/build4d-action - token: ${{ secrets.GH_4D_ACTION_TOKEN }} - path: .github/actions/build4d-action - - - name: Checkout tool4d-action - uses: actions/checkout@v5 - with: - repository: 4d/tool4d-action - token: ${{ secrets.GH_4D_ACTION_TOKEN }} - path: .github/actions/tool4d-action - - - name: Checkout setup4d-action - uses: actions/checkout@v5 - with: - repository: 4d/setup4d-action - token: ${{ secrets.GH_4D_ACTION_TOKEN }} - path: .github/actions/setup4d-action - - + - name: 🏗️ Build ${{ github.event.repository.name }} - uses: ./.github/actions/build4d-action + uses: 4d/build4d-action@main with: project: ${{ github.workspace }}/${{ github.event.repository.name }}/Project/${{ github.event.repository.name }}.4DProject product-line: ${{env.TOOL4D_PRODUCT_LINE}} @@ -74,7 +51,7 @@ jobs: cp -r ${{ github.workspace }}/${{ github.event.repository.name }}/build/ ${{ github.workspace }}/${{ github.event.repository.name }}_UnitTests/Components - name: Download Setup4d - uses: ./.github/actions/setup4d-action + uses: 4d/setup4d-action@main with: product-line: ${{env.SETUP4D_PRODUCT_LINE}} version: ${{env.SETUP4D_VERSION}} @@ -86,7 +63,7 @@ jobs: mv ${{ github.workspace }}/.github/actions/setup4d-action/work/ ${{ github.workspace }}/${{ github.event.repository.name }}_UnitTests/Work/ - name: 🏗️ Build ${{ github.event.repository.name }}_UnitTests - uses: ./.github/actions/build4d-action + uses: 4d/build4d-action@main with: project: ${{ github.workspace }}/${{ github.event.repository.name }}_UnitTests/Project/${{ github.event.repository.name }}_UnitTests.4DProject product-line: ${{env.TOOL4D_PRODUCT_LINE}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac50dd9..d6a6973 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,22 +24,6 @@ jobs: lfs: true # Disabling shallow clone is recommended for improving relevancy of reporting fetch-depth: 0 - - - name: Checkout build4d-action - uses: actions/checkout@v5 - with: - repository: 4d/build4d-action - token: ${{ secrets.GH_4D_ACTION_TOKEN }} - path: .github/actions/build4d-action - - - name: Checkout tool4d-action - uses: actions/checkout@v5 - with: - repository: 4d/tool4d-action - token: ${{ secrets.GH_4D_ACTION_TOKEN }} - path: .github/actions/tool4d-action - - - name: Extract version run: | echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV @@ -50,31 +34,31 @@ jobs: /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $VERSION" "${GITHUB_WORKSPACE}/${{ github.event.repository.name }}/Info.plist" cat "${GITHUB_WORKSPACE}/${{ github.event.repository.name }}/Info.plist" - - name: 🏗️ Build ${{ github.event.repository.name }} - uses: ./.github/actions/build4d-action + uses: 4d/build4d-action@main with: project: ${{ github.workspace }}/${{ github.event.repository.name }}/Project/${{ github.event.repository.name }}.4DProject product-line: ${{env.TOOL4D_PRODUCT_LINE}} version: ${{env.TOOL4D_VERSION}} - targets : all - #actions: "build,pack,sign,archive" - actions: "build,pack,archive" build: ${{env.TOOL4D_BUILDNUMBER}} token: ${{ secrets.TOOL4D_DL_TOKEN }} + targets : all + actions: "clean,build,pack,sign,archive" + sign-certificate: "Developer ID Application: 4D" + sign-as-bundle: true ignore-warnings: true - #- name: Notarize - # run: | - # xcrun notarytool submit "${{ github.event.repository.name }}/build/${{ github.event.repository.name }}.zip" --keychain-profile "notary" --wait >> notary_tool.log - # if grep -r "status: Accepted" "notary_tool.log"; then - # echo "Notarize Success" - # exit 0 - # else - # echo "Notarize Failed" - # exit 1 - # fi + - name: Notarize + run: | + xcrun notarytool submit "${{ github.event.repository.name }}/build/${{ github.event.repository.name }}.zip" --keychain-profile "notary4d" --wait >> notary_tool.log + if grep -r "status: Accepted" "notary_tool.log"; then + echo "Notarize Success" + exit 0 + else + echo "Notarize Failed" + exit 1 + fi - name: Upload Artifact if: github.event_name != 'pull_request' From 3fb1a89916c208fd6b090dfa661628ad84392b07 Mon Sep 17 00:00:00 2001 From: Pierre-Francois Huillet Date: Wed, 1 Oct 2025 15:33:33 +0200 Subject: [PATCH 2/4] Update build.yml: fix whitespace, update setup4d-action checkout to v4, and adjust usage path for downloading Setup4d --- .github/workflows/build.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5fa8898..85192df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: lfs: true # Disabling shallow clone is recommended for improving relevancy of reporting fetch-depth: 0 - + - name: 🏗️ Build ${{ github.event.repository.name }} uses: 4d/build4d-action@main with: @@ -50,8 +50,15 @@ jobs: run: | cp -r ${{ github.workspace }}/${{ github.event.repository.name }}/build/ ${{ github.workspace }}/${{ github.event.repository.name }}_UnitTests/Components + - name: Checkout setup4d-action + uses: actions/checkout@v4 + with: + repository: 4d/setup4d-action + token: ${{ secrets.GH_4D_ACTION_TOKEN }} + path: .github/actions/setup4d-action + - name: Download Setup4d - uses: 4d/setup4d-action@main + uses: ./.github/actions/setup4d-action with: product-line: ${{env.SETUP4D_PRODUCT_LINE}} version: ${{env.SETUP4D_VERSION}} From 71a3bdddce82c30709ba904bab2fe8ad7b38adf5 Mon Sep 17 00:00:00 2001 From: Pierre-Francois Huillet Date: Wed, 1 Oct 2025 15:36:47 +0200 Subject: [PATCH 3/4] Update build.yml: refine push event triggers to only run on the main branch and add workflow_dispatch support --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85192df..3e4b1b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,12 +2,13 @@ name: Build on: push: - branches: ['**'] # Only run on branches - tags-ignore: ['*'] # Ignore all tags paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**'] + branches: + - main # Only run on branches pull_request: types: [opened, synchronize, reopened] paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**'] + workflow_dispatch: env: TOOL4D_PRODUCT_LINE: '20Rx' From d051059930f92e7fd68ad2aece9d686eccdceb51 Mon Sep 17 00:00:00 2001 From: Pierre-Francois Huillet Date: Wed, 1 Oct 2025 15:44:20 +0200 Subject: [PATCH 4/4] Update workflows: refine tag ignore settings in build.yml and standardize macOS label in release.yml --- .github/workflows/build.yml | 1 + .github/workflows/release.yml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e4b1b7..963fcd0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,7 @@ on: paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**'] branches: - main # Only run on branches + tags-ignore: ['*'] # Ignore all tags pull_request: types: [opened, synchronize, reopened] paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**'] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6a6973..8673711 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ env: jobs: build: name: "Build" - runs-on: [macos-latest] + runs-on: [macOS] steps: - name: 📄 Checkout repository uses: actions/checkout@v5 @@ -48,7 +48,6 @@ jobs: sign-as-bundle: true ignore-warnings: true - - name: Notarize run: | xcrun notarytool submit "${{ github.event.repository.name }}/build/${{ github.event.repository.name }}.zip" --keychain-profile "notary4d" --wait >> notary_tool.log