Skip to content

Commit feee21d

Browse files
committed
Refactor MacOS signing workflow integration
1 parent f6f4485 commit feee21d

2 files changed

Lines changed: 22 additions & 35 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,15 @@ jobs:
132132
path: dist/
133133
retention-days: 7
134134

135+
sign-macos-binaries:
136+
name: Sign MacOS Binaries
137+
needs: build-binaries
138+
uses: ./.github/workflows/sign-macos.yml
139+
secrets: inherit
140+
135141
create-checksums:
136142
name: Create Checksums
137-
needs: build-binaries
143+
needs: [build-binaries, sign-macos-binaries]
138144
runs-on: ubuntu-latest
139145
if: startsWith(github.ref, 'refs/tags/')
140146
steps:
@@ -160,7 +166,7 @@ jobs:
160166

161167
create-release:
162168
name: Create GitHub Release
163-
needs: create-checksums
169+
needs: [create-checksums, sign-macos-binaries]
164170
runs-on: ubuntu-latest
165171
if: startsWith(github.ref, 'refs/tags/')
166172
steps:

.github/workflows/sign-macos.yml

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,8 @@
11
name: Sign MacOS Binaries
22

33
on:
4-
push:
5-
branches:
6-
- sign-macos
74
workflow_dispatch:
8-
inputs:
9-
artifact-pattern:
10-
description: 'Pattern for artifacts to download (default: runbooks_darwin_*)'
11-
required: false
12-
type: string
13-
default: 'runbooks_darwin_*'
14-
upload-artifact-name:
15-
description: 'Name for the uploaded signed artifacts'
16-
required: false
17-
type: string
18-
default: 'macos-signed-files'
195
workflow_call:
20-
inputs:
21-
artifact-pattern:
22-
description: 'Pattern for artifacts to download (default: runbooks_darwin_*)'
23-
required: false
24-
type: string
25-
default: 'runbooks_darwin_*'
26-
upload-artifact-name:
27-
description: 'Name for the uploaded signed artifacts'
28-
required: false
29-
type: string
30-
default: 'macos-signed-files'
316

327
jobs:
338
sign-macos:
@@ -36,9 +11,6 @@ jobs:
3611
env:
3712
MISE_PROFILE: cicd
3813
GON_VERSION: v0.0.37
39-
# Use inputs if available (workflow_dispatch/workflow_call), otherwise use defaults
40-
ARTIFACT_PATTERN: ${{ inputs.artifact-pattern || 'runbooks-darwin-*' }}
41-
UPLOAD_ARTIFACT_NAME: ${{ inputs.upload-artifact-name || 'macos-signed-files' }}
4214

4315
steps:
4416
- name: Checkout code
@@ -47,7 +19,7 @@ jobs:
4719
- name: Download macOS build artifacts
4820
uses: actions/download-artifact@v6
4921
with:
50-
pattern: ${{ env.ARTIFACT_PATTERN }}
22+
pattern: runbooks-darwin-*
5123
path: artifacts/
5224

5325
- name: Prepare build artifacts
@@ -96,9 +68,18 @@ jobs:
9668
}
9769
done
9870
99-
- name: Upload Signed MacOS Binaries
71+
- name: Upload Signed MacOS Binaries (darwin-amd64)
10072
uses: actions/upload-artifact@v5
10173
with:
102-
name: ${{ env.UPLOAD_ARTIFACT_NAME }}
103-
path: bin/runbooks_darwin_*
104-
if-no-files-found: error
74+
name: runbooks-darwin-amd64
75+
path: bin/runbooks_darwin_amd64
76+
if-no-files-found: error
77+
overwrite: true
78+
79+
- name: Upload Signed MacOS Binaries (darwin-arm64)
80+
uses: actions/upload-artifact@v5
81+
with:
82+
name: runbooks-darwin-arm64
83+
path: bin/runbooks_darwin_arm64
84+
if-no-files-found: error
85+
overwrite: true

0 commit comments

Comments
 (0)