Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 14 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ 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
tags-ignore: ['*'] # Ignore all tags
pull_request:
types: [opened, synchronize, reopened]
paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**']
workflow_dispatch:

env:
TOOL4D_PRODUCT_LINE: '20Rx'
Expand All @@ -23,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ windows-latest,macos-latest]
os: [ macOS,Windows]


runs-on: ${{ matrix.os }}
Expand All @@ -35,31 +37,8 @@ jobs:
# 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}}
Expand All @@ -73,6 +52,13 @@ 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: ./.github/actions/setup4d-action
with:
Expand All @@ -86,7 +72,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}}
Expand Down
49 changes: 16 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,14 @@ env:
jobs:
build:
name: "Build"
runs-on: [macos-latest]
runs-on: [macOS]
steps:
- name: 📄 Checkout repository
uses: actions/checkout@v5
with:
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
Expand All @@ -50,31 +34,30 @@ 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'
Expand Down
Loading