Repository navigation
116 lines (107 loc) · 4.08 KB
/
Copy pathrelease-ios-runner.yml
File metadata and controls
116 lines (107 loc) · 4.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Release iOS Runner
on:
# release.yml calls this after publishing a stable release; dispatch reruns it for one tag.
workflow_call:
inputs:
include_watchos:
type: boolean
default: true
release_tag:
description: GitHub Release tag to upload assets to, for example v0.12.6.
required: true
type: string
workflow_dispatch:
inputs:
release_tag:
description: GitHub Release tag to upload assets to, for example v0.12.6.
required: true
type: string
include_watchos:
description: Also publish Watch assets. Leave unchecked for historical iOS-only release tags.
type: boolean
default: false
checkout_ref:
description: Optional branch, tag, or commit SHA to build. Defaults to the selected workflow ref.
required: false
type: string
permissions:
contents: write
jobs:
publish-ios-simulator-runner:
name: Publish ${{ matrix.destination }} Simulator Runner
strategy:
fail-fast: false
matrix:
destination: ${{ fromJSON(inputs.include_watchos && '["iOS","watchOS"]' || '["iOS"]') }}
# Xcode 27 is this image's default. Limrun hosts load XCTest from their own Xcode 27, and the
# packaging step refuses a runner from an older Xcode, which would embed XCTest.
runs-on: blacksmith-6vcpu-macos-27
timeout-minutes: 90
env:
AGENT_DEVICE_XCUITEST_PLATFORM: ${{ matrix.destination == 'iOS' && 'ios' || 'watchos' }}
AGENT_DEVICE_XCUITEST_DESTINATION: generic/platform=${{ matrix.destination }} Simulator
AGENT_DEVICE_IOS_CLEAN_DERIVED: '1'
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ inputs.checkout_ref || github.ref }}
- name: Checkout release validator
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ${{ job.workflow_repository }}
ref: ${{ job.workflow_sha }}
path: .release-validator
sparse-checkout: scripts/release-version.mjs
sparse-checkout-cone-mode: false
persist-credentials: false
- name: Setup toolchain
uses: ./.github/actions/setup-node-pnpm
with:
node-version: '24.13'
- name: Resolve release metadata
id: meta
env:
TAG_NAME: ${{ inputs.release_tag }}
run: |
set -euo pipefail
node .release-validator/scripts/release-version.mjs asset-tag "$TAG_NAME"
VERSION="${TAG_NAME#v}"
echo "tag=$TAG_NAME" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
shell: bash
- name: Build simulator runner
env:
AGENT_DEVICE_IOS_RUNNER_DERIVED_PATH: ${{ github.workspace }}/.tmp/ios-runner-derived
run: sh ./scripts/build-xcuitest-apple.sh
shell: bash
- name: Package simulator runner
id: package
env:
AGENT_DEVICE_IOS_RUNNER_DERIVED_PATH: ${{ github.workspace }}/.tmp/ios-runner-derived
RELEASE_ASSET_DIR: ${{ github.workspace }}/.tmp/release-assets
RELEASE_VERSION: ${{ steps.meta.outputs.version }}
RELEASE_TAG: ${{ steps.meta.outputs.tag }}
run: |
set -euo pipefail
mkdir -p "${RELEASE_ASSET_DIR}"
sh ./scripts/package-ios-simulator-runner.sh \
"$RELEASE_VERSION" \
"$RELEASE_TAG" \
"${RELEASE_ASSET_DIR}"
shell: bash
- name: Upload runner assets to GitHub Release
env:
ARCHIVE_PATH: ${{ steps.package.outputs.archive_path }}
CHECKSUM_PATH: ${{ steps.package.outputs.checksum_path }}
MANIFEST_PATH: ${{ steps.package.outputs.manifest_path }}
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ steps.meta.outputs.tag }}
run: |
set -euo pipefail
gh release upload "$RELEASE_TAG" \
"$ARCHIVE_PATH" \
"$CHECKSUM_PATH" \
"$MANIFEST_PATH" \
--clobber
shell: bash