Run iOS release on GitHub runner (#2239)
This commit is contained in:
18
.github/workflows/ios-ci.yml
vendored
18
.github/workflows/ios-ci.yml
vendored
@@ -194,6 +194,20 @@ jobs:
|
||||
folder: build/docs
|
||||
target-folder: ios/latest/
|
||||
|
||||
ios-release:
|
||||
runs-on: macos-14
|
||||
needs: ios-build
|
||||
if: github.ref == 'refs/heads/main'
|
||||
defaults:
|
||||
run:
|
||||
working-directory: platform/ios
|
||||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: VERSION file changed
|
||||
id: version-file-ios-changed
|
||||
uses: tj-actions/changed-files@v44
|
||||
@@ -204,15 +218,17 @@ jobs:
|
||||
- name: Should make release?
|
||||
if: |
|
||||
github.event.inputs.release == 'full' || github.event.inputs.release == 'pre' ||
|
||||
(github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.version-file-ios-changed.outputs.any_changed == 'true')
|
||||
(github.event_name == 'push' && steps.version-file-ios-changed.outputs.any_changed == 'true')
|
||||
run: echo make_release=true >> "$GITHUB_ENV"
|
||||
|
||||
- name: Build XCFramework
|
||||
if: env.make_release
|
||||
run: |
|
||||
bazel build --compilation_mode=opt --apple_generate_dsym --output_groups=+dsyms --//:renderer=metal //platform/ios:MapLibre.dynamic --embed_label=maplibre_ios_"$(cat VERSION)"
|
||||
echo xcframework="$(bazel info execution_root)"/"$(bazel cquery --output=files --compilation_mode=opt --//:renderer=metal //platform/ios:MapLibre.dynamic)" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Create .zip with debug symbols
|
||||
if: env.make_release
|
||||
working-directory: ./bazel-bin/platform/ios/MapLibre.dynamic_dsyms
|
||||
run: |
|
||||
zip MapLibre_ios_device.framework.dSYM.zip MapLibre_ios_device.framework.dSYM/Contents/Resources/DWARF/MapLibre_ios_device MapLibre_ios_device.framework.dSYM/Contents/Info.plist
|
||||
|
||||
31
.github/workflows/ios-release.yml
vendored
31
.github/workflows/ios-release.yml
vendored
@@ -1,31 +0,0 @@
|
||||
name: ios-release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [self-hosted, macOS, ARM64]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: platform/ios
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: npm install
|
||||
run: npm ci --ignore-scripts
|
||||
|
||||
- run: chmod +x scripts/deploy-swift-package.sh
|
||||
|
||||
- run: cp bazel/example_config.bzl bazel/config.bzl
|
||||
|
||||
- name: Build, package, and upload iOS release
|
||||
run: scripts/deploy-swift-package.sh
|
||||
env:
|
||||
DIST_GITHUB_TOKEN: ${{ secrets.DIST_GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user