Skip to content

build: publish iOS simulator runner release assets (#418) #4

build: publish iOS simulator runner release assets (#418)

build: publish iOS simulator runner release assets (#418) #4

name: Release iOS Runner

Check failure on line 1 in .github/workflows/release-ios-runner.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release-ios-runner.yml

Invalid workflow file

(Line: 20, Col: 45): Unrecognized named-value: 'runner'. Located at position 1 within expression: runner.temp, (Line: 21, Col: 26): Unrecognized named-value: 'runner'. Located at position 1 within expression: runner.temp
on:
release:
types:
- published
permissions:
contents: write
jobs:
publish-ios-simulator-runner:
name: Publish iOS Simulator Runner
runs-on: macos-26
timeout-minutes: 90
env:
AGENT_DEVICE_XCUITEST_PLATFORM: ios
AGENT_DEVICE_XCUITEST_DESTINATION: generic/platform=iOS Simulator
AGENT_DEVICE_IOS_CLEAN_DERIVED: "1"
AGENT_DEVICE_IOS_RUNNER_DERIVED_PATH: ${{ runner.temp }}/ios-runner-derived
RELEASE_ASSET_DIR: ${{ runner.temp }}/release-assets
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: "22"
- name: Resolve release metadata
id: meta
run: |
set -euo pipefail
PACKAGE_VERSION="$(node -p "JSON.parse(require('node:fs').readFileSync('package.json', 'utf8')).version")"
TAG_NAME="${{ github.event.release.tag_name }}"
VERSION="${TAG_NAME#v}"
if [ "$VERSION" != "$PACKAGE_VERSION" ]; then
echo "Release tag $TAG_NAME does not match package.json version $PACKAGE_VERSION" >&2
exit 1
fi
echo "tag=$TAG_NAME" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
shell: bash
- name: Build iOS simulator runner
run: sh ./scripts/build-xcuitest-apple.sh
shell: bash
- name: Package iOS simulator runner
id: package
run: |
set -euo pipefail
mkdir -p "${RELEASE_ASSET_DIR}"
sh ./scripts/package-ios-simulator-runner.sh \
"${{ steps.meta.outputs.version }}" \
"${{ steps.meta.outputs.tag }}" \
"${RELEASE_ASSET_DIR}"
shell: bash
- name: Upload runner assets to GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
gh release upload "${{ steps.meta.outputs.tag }}" \
"${{ steps.package.outputs.archive_path }}" \
"${{ steps.package.outputs.checksum_path }}" \
"${{ steps.package.outputs.manifest_path }}" \
--clobber
shell: bash