Skip to content

Commit 7e477de

Browse files
refactor(ci): split PR workflows into separate notification jobs
Moves PR comment steps into dedicated `comment-start`, `comment-success`, and `comment-failure` jobs so that Linux notification steps no longer run on the macOS build runner. Adds a `use-blacksmith` input to opt in to Blacksmith Linux runners for these lightweight jobs. Also documents missing `swift-pkg-pr` inputs and secrets in the README.
1 parent 5e56f0d commit 7e477de

3 files changed

Lines changed: 71 additions & 8 deletions

File tree

.github/workflows/pkg-release-pr.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,19 @@ on:
1919
type: string
2020
required: false
2121
description: "Path to additional payload directory whose contents mirror the install root"
22+
use-blacksmith:
23+
type: boolean
24+
required: false
25+
default: false
26+
description: "Opt in to Blacksmith Linux runners (blacksmith-4vcpu-ubuntu-2404). Requires the Blacksmith GitHub App installed on the caller org. Defaults to ubuntu-latest."
2227
# Cancel any in-progress run for the same PR when a new commit is pushed.
2328
concurrency:
2429
group: pkg-release-pr-${{ github.event.pull_request.number }}
2530
cancel-in-progress: true
2631

2732
jobs:
28-
build:
29-
runs-on: macos-26
33+
comment-start:
34+
runs-on: ${{ inputs.use-blacksmith && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
3035
permissions:
3136
pull-requests: write
3237
contents: read
@@ -45,6 +50,12 @@ jobs:
4550
| **Commit** | ${{ github.sha }} |
4651
| **Run** | [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) |
4752
53+
build:
54+
needs: comment-start
55+
runs-on: macos-26
56+
permissions:
57+
contents: read
58+
steps:
4859
# ── Build ────────────────────────────────────────────────────────────
4960
- uses: actions/checkout@v5
5061

@@ -65,9 +76,16 @@ jobs:
6576
path: artifacts/*.pkg
6677
retention-days: 7
6778

79+
comment-success:
80+
needs: build
81+
if: ${{ always() && needs.build.result == 'success' }}
82+
runs-on: ${{ inputs.use-blacksmith && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
83+
permissions:
84+
pull-requests: write
85+
contents: read
86+
steps:
6887
# ── Notify: success ──────────────────────────────────────────────────
6988
- name: Comment — build succeeded
70-
if: success()
7189
uses: photon-hq/buildspace/.github/blocks/comment-on-pr@main
7290
with:
7391
comment-key: pkg-release-pr-build
@@ -83,9 +101,16 @@ jobs:
83101
84102
Download the `.pkg` from the [Actions run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) artifacts section.
85103
104+
comment-failure:
105+
needs: build
106+
if: ${{ always() && needs.build.result == 'failure' }}
107+
runs-on: ${{ inputs.use-blacksmith && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
108+
permissions:
109+
pull-requests: write
110+
contents: read
111+
steps:
86112
# ── Notify: failure ──────────────────────────────────────────────────
87113
- name: Comment — build failed
88-
if: failure()
89114
uses: photon-hq/buildspace/.github/blocks/comment-on-pr@main
90115
with:
91116
comment-key: pkg-release-pr-build

.github/workflows/swift-pkg-pr.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,27 @@ on:
3434
required: false
3535
default: false
3636
description: "Mint an app token (APP_ID/APP_PRIVATE_KEY) so SwiftPM can clone private/internal org dependencies."
37+
use-blacksmith:
38+
type: boolean
39+
required: false
40+
default: false
41+
description: "Opt in to Blacksmith Linux runners (blacksmith-4vcpu-ubuntu-2404). Requires the Blacksmith GitHub App installed on the caller org. Defaults to ubuntu-latest."
3742
secrets:
3843
SECRET_ENV_VARS:
3944
required: false
45+
APP_ID:
46+
required: false
47+
APP_PRIVATE_KEY:
48+
required: false
4049

4150
# Cancel any in-progress run for the same PR when a new commit is pushed.
4251
concurrency:
4352
group: swift-pkg-pr-${{ github.event.pull_request.number }}
4453
cancel-in-progress: true
4554

4655
jobs:
47-
build:
48-
runs-on: macos-26
56+
comment-start:
57+
runs-on: ${{ inputs.use-blacksmith && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
4958
permissions:
5059
pull-requests: write
5160
contents: read
@@ -64,6 +73,12 @@ jobs:
6473
| **Commit** | ${{ github.sha }} |
6574
| **Run** | [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) |
6675
76+
build:
77+
needs: comment-start
78+
runs-on: macos-26
79+
permissions:
80+
contents: read
81+
steps:
6782
# ── Mint app token for private SPM dependencies (optional) ───────────
6883
- name: Mint app token for private SPM deps
6984
id: app-token
@@ -107,9 +122,16 @@ jobs:
107122
path: artifacts/*.pkg
108123
retention-days: 7
109124

125+
comment-success:
126+
needs: build
127+
if: ${{ always() && needs.build.result == 'success' }}
128+
runs-on: ${{ inputs.use-blacksmith && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
129+
permissions:
130+
pull-requests: write
131+
contents: read
132+
steps:
110133
# ── Notify: success ──────────────────────────────────────────────────
111134
- name: Comment — build succeeded
112-
if: success()
113135
uses: photon-hq/buildspace/.github/blocks/comment-on-pr@main
114136
with:
115137
comment-key: swift-pkg-pr-build
@@ -125,9 +147,16 @@ jobs:
125147
126148
Download the `.pkg` from the [Actions run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) artifacts section.
127149
150+
comment-failure:
151+
needs: build
152+
if: ${{ always() && needs.build.result == 'failure' }}
153+
runs-on: ${{ inputs.use-blacksmith && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
154+
permissions:
155+
pull-requests: write
156+
contents: read
157+
steps:
128158
# ── Notify: failure ──────────────────────────────────────────────────
129159
- name: Comment — build failed
130-
if: failure()
131160
uses: photon-hq/buildspace/.github/blocks/comment-on-pr@main
132161
with:
133162
comment-key: swift-pkg-pr-build

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ Release pipeline for macOS `.pkg` distribution packages that don't contain a com
506506
| `identifier` | string | Yes | — | Package identifier (e.g., `com.example.my-config`) |
507507
| `scripts-path` | string | No | `""` | Path to scripts directory with preinstall/postinstall scripts |
508508
| `payload-path` | string | No | `""` | Path to payload directory whose contents mirror the install root |
509+
| `use-blacksmith` | boolean | No | `false` | Use Blacksmith Linux runners for Linux jobs |
509510
| `jamf-url` | string | No | `""` | Jamf Pro instance URL (leave empty to skip Jamf upload) |
510511
| `jamf-package-priority` | string | No | `""` | Package priority in Jamf Pro |
511512
| `jamf-package-name` | string | No | `""` | Package name to match in Jamf Pro |
@@ -549,6 +550,7 @@ Builds a macOS `.pkg` (without compiling a binary) on every PR commit and report
549550
| `identifier` | string | Yes | — | Package identifier (e.g., `com.example.my-config`) |
550551
| `scripts-path` | string | No | `""` | Path to scripts directory with preinstall/postinstall scripts |
551552
| `payload-path` | string | No | `""` | Path to payload directory whose contents mirror the install root |
553+
| `use-blacksmith` | boolean | No | `false` | Use Blacksmith Linux runners for notification jobs; the macOS package build stays on `macos-26` |
552554

553555
#### Example
554556

@@ -589,12 +591,19 @@ Builds a macOS `.pkg` on every PR commit and reports status directly in the PR a
589591
| `package-name` | string | Yes | — | Name of the Swift binary / package |
590592
| `identifier` | string | Yes | — | Package identifier (e.g., `com.example.mytool`) |
591593
| `scripts-path` | string | No | `""` | Path to scripts directory with preinstall/postinstall scripts |
594+
| `payload-path` | string | No | `""` | Path to additional payload directory whose contents mirror the install root |
595+
| `resource-bundles` | string | No | `""` | Space-separated list of SPM resource bundle names to include in the `.pkg` |
596+
| `entitlements` | string | No | `""` | Path to entitlements plist for ad-hoc codesigning the built binary |
597+
| `private-deps` | boolean | No | `false` | Mint a GitHub App token so SwiftPM can clone private/internal org dependencies |
598+
| `use-blacksmith` | boolean | No | `false` | Use Blacksmith Linux runners for notification jobs; the macOS Swift/package build stays on `macos-26` |
592599

593600
#### Secrets
594601

595602
| Secret | Required | Description |
596603
|--------|----------|-------------|
597604
| `SECRET_ENV_VARS` | No | Compile-time env vars written to `.env` |
605+
| `APP_ID` | No | GitHub App ID for private SwiftPM dependencies |
606+
| `APP_PRIVATE_KEY` | No | GitHub App private key for private SwiftPM dependencies |
598607

599608
#### Example
600609

0 commit comments

Comments
 (0)