Skip to content

Commit 347b88c

Browse files
committed
Refactor GitHub Actions workflows: update build.yml for naming consistency and add release.yml for automated release process
1 parent 8c9da03 commit 347b88c

File tree

3 files changed

+134
-6
lines changed

3 files changed

+134
-6
lines changed

.github/workflows/4D.entitlements

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.automation.apple-events</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
8+
<true/>
9+
<key>com.apple.security.cs.allow-jit</key>
10+
<true/>
11+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
12+
<true/>
13+
<key>com.apple.security.cs.debugger</key>
14+
<true/>
15+
<key>com.apple.security.cs.disable-executable-page-protection</key>
16+
<true/>
17+
<key>com.apple.security.cs.disable-library-validation</key>
18+
<true/>
19+
<key>com.apple.security.device.audio-input</key>
20+
<true/>
21+
<key>com.apple.security.device.camera</key>
22+
<true/>
23+
<key>com.apple.security.personal-information.addressbook</key>
24+
<true/>
25+
<key>com.apple.security.personal-information.calendars</key>
26+
<true/>
27+
<key>com.apple.security.personal-information.location</key>
28+
<true/>
29+
<key>com.apple.security.personal-information.photos-library</key>
30+
<true/>
31+
</dict>
32+
</plist>

.github/workflows/build.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
name: build
1+
name: Build
22

33
on:
44
push:
55
paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**']
6-
#branches:
7-
# - main
86
pull_request:
97
types: [opened, synchronize, reopened]
108
paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**']
119

1210
env:
13-
#TOOL4D_PRODUCT_LINE: 'vcs'
14-
#TOOL4D_VERSION: 'vcs'
15-
#TOOL4D_BUILDNUMBER : 'official'
1611
TOOL4D_PRODUCT_LINE: '20Rx'
1712
TOOL4D_VERSION: '20R10'
1813
TOOL4D_BUILDNUMBER : '100221'

.github/workflows/release.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
6+
permissions:
7+
contents: write
8+
packages: write
9+
10+
env:
11+
TOOL4D_PRODUCT_LINE: '20Rx'
12+
TOOL4D_VERSION: '20R10'
13+
TOOL4D_BUILDNUMBER : '100221'
14+
15+
16+
jobs:
17+
build:
18+
name: "Build"
19+
runs-on: [macOS]
20+
steps:
21+
- name: 📄 Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
lfs: true
25+
# Disabling shallow clone is recommended for improving relevancy of reporting
26+
fetch-depth: 0
27+
28+
- name: Checkout build4d-action
29+
uses: actions/checkout@v4
30+
with:
31+
repository: 4d/build4d-action
32+
token: ${{ secrets.GH_4D_ACTION_TOKEN }}
33+
path: .github/actions/build4d-action
34+
35+
- name: Checkout tool4d-action
36+
uses: actions/checkout@v4
37+
with:
38+
repository: 4d/tool4d-action
39+
token: ${{ secrets.GH_4D_ACTION_TOKEN }}
40+
path: .github/actions/tool4d-action
41+
42+
43+
- name: 🏗️ Build ${{ github.event.repository.name }}
44+
uses: ./.github/actions/build4d-action
45+
with:
46+
project: ${{ github.workspace }}/${{ github.event.repository.name }}/Project/${{ github.event.repository.name }}.4DProject
47+
product-line: ${{env.TOOL4D_PRODUCT_LINE}}
48+
version: ${{env.TOOL4D_VERSION}}
49+
targets : all
50+
#actions: "build,pack,sign,archive"
51+
actions: "build,pack,archive"
52+
build: ${{env.TOOL4D_BUILDNUMBER}}
53+
token: ${{ secrets.TOOL4D_DL_TOKEN }}
54+
ignore-warnings: true
55+
56+
57+
#- name: Notarize
58+
# run: |
59+
# xcrun notarytool submit "${{ github.event.repository.name }}/build/${{ github.event.repository.name }}.zip" --keychain-profile "notary" --wait >> notary_tool.log
60+
# if grep -r "status: Accepted" "notary_tool.log"; then
61+
# echo "Notarize Success"
62+
# exit 0
63+
# else
64+
# echo "Notarize Failed"
65+
# exit 1
66+
# fi
67+
68+
- name: Upload Artifact
69+
if: github.event_name != 'pull_request'
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: "${{ github.event.repository.name }}.zip"
73+
path: "${{ github.event.repository.name }}/build/${{ github.event.repository.name }}.zip"
74+
retention-days: 1
75+
if-no-files-found: error
76+
release:
77+
needs: build
78+
name: "Release Component"
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: 📄 Checkout repository
82+
uses: actions/checkout@v4
83+
with:
84+
lfs: true
85+
# Disabling shallow clone is recommended for improving relevancy of reporting
86+
fetch-depth: 0
87+
88+
- name: Download packages
89+
uses: actions/download-artifact@v4
90+
with:
91+
name: "${{ github.event.repository.name }}.zip"
92+
path: artifact
93+
94+
- name: Display Artifact Directory Content
95+
run: ls -R artifact
96+
97+
- name: 📦 release package
98+
run: |
99+
gh release upload ${{github.event.release.tag_name}} "${{github.workspace}}/artifact/${{ github.event.repository.name }}.zip"
100+
env:
101+
GITHUB_TOKEN: ${{ github.TOKEN }}

0 commit comments

Comments
 (0)