Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit bd08950

Browse files
committed
feat: add codesign for macos
1 parent 75cafe6 commit bd08950

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

.github/workflows/python-package.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,39 @@ jobs:
133133
uses: actions/upload-artifact@v4
134134
with:
135135
name: ${{env.MODEL_NAME}}-${{ matrix.os }}-${{ matrix.name }}
136-
path: ${{env.PYTHON_FOLDER}}
136+
path: ${{env.PYTHON_FOLDER}}
137+
138+
codesign:
139+
runs-on: macos-latest
140+
needs: build-and-test
141+
steps:
142+
- name: checkout
143+
uses: actions/checkout@v3
144+
- uses: apple-actions/import-codesign-certs@v2
145+
continue-on-error: true
146+
with:
147+
p12-file-base64: ${{ secrets.CODE_SIGN_P12_BASE64 }}
148+
p12-password: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
149+
- name: Download Artifact
150+
uses: actions/download-artifact@v4
151+
with:
152+
name: ${{env.MODEL_NAME}}-mac-amd64
153+
- name: Download Artifact
154+
uses: actions/download-artifact@v4
155+
with:
156+
name: ${{env.MODEL_NAME}}-mac-amd64
157+
158+
- run: |
159+
find "${{env.MODEL_NAME}}-mac-amd64" \( -type f -perm +111 -o -name "*.node" \) -exec codesign --force --entitlements="./engine/templates/macos/entitlements.plist" -s "${{ secrets.DEVELOPER_ID }}" --options=runtime {} \;
160+
find "${{env.MODEL_NAME}}-mac-arm64" \( -type f -perm +111 -o -name "*.node" \) -exec codesign --force --entitlements="./engine/templates/macos/entitlements.plist" -s "${{ secrets.DEVELOPER_ID }}" --options=runtime {} \;
161+
162+
- name: Upload Artifact
163+
uses: actions/upload-artifact@v4
164+
with:
165+
name: ${{env.MODEL_NAME}}-mac-amd64
166+
path: ${{env.MODEL_NAME}}-mac-amd64
167+
- name: Upload Artifact
168+
uses: actions/upload-artifact@v4
169+
with:
170+
name: ${{env.MODEL_NAME}}-mac-arm64
171+
path: ${{env.MODEL_NAME}}-mac-arm64

0 commit comments

Comments
 (0)