Release #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| packages: write | |
| env: | |
| TOOL4D_PRODUCT_LINE: '20Rx' | |
| TOOL4D_VERSION: '20R10' | |
| TOOL4D_BUILDNUMBER : '100221' | |
| jobs: | |
| build: | |
| name: "Build" | |
| 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: Extract version | |
| run: | | |
| echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
| - name: "Set release version to Info.plist" | |
| run: | | |
| /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $VERSION" "${GITHUB_WORKSPACE}/${{ github.event.repository.name }}/Info.plist" | |
| /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: 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}} | |
| 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 "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' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "${{ github.event.repository.name }}.zip" | |
| path: "${{ github.event.repository.name }}/build/${{ github.event.repository.name }}.zip" | |
| retention-days: 1 | |
| if-no-files-found: error | |
| release: | |
| needs: build | |
| name: "Release Component" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📄 Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| # Disabling shallow clone is recommended for improving relevancy of reporting | |
| fetch-depth: 0 | |
| - name: Download packages | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: "${{ github.event.repository.name }}.zip" | |
| path: artifact | |
| - name: Display Artifact Directory Content | |
| run: ls -R artifact | |
| - name: 📦 release package | |
| run: | | |
| gh release upload ${{github.event.release.tag_name}} "${{github.workspace}}/artifact/${{ github.event.repository.name }}.zip" | |
| env: | |
| GITHUB_TOKEN: ${{ github.TOKEN }} |