Create a MacOS application artifact in GHA (#104)

This commit is contained in:
Drabble 2022-05-23 11:03:50 +02:00 committed by GitHub
parent 37d2ac73a9
commit 01c45fd13f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 1 deletions

26
.github/actions/demo/macos/action.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: macOS
description: Build for macOS
inputs:
GITHUB_TOKEN:
required: true
description: On macos runners we often hit API limits. Using this token avoid this.
runs:
using: "composite"
steps:
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
- name: Install toolchain
shell: bash
run: just default-toolchain
- uses: Swatinem/rust-cache@v1
- name: Build
shell: bash
run: cd apple/xcode && xcodebuild -scheme "example (macOS)" build CODE_SIGNING_ALLOWED=NO MACOSX_DEPLOYMENT_TARGET=10.9 -derivedDataPath build
- uses: actions/upload-artifact@v3
with:
name: maplibre-x86_64-apple-darwin-demo
path: apple/xcode/build/Build/Products/Debug/*.app
if-no-files-found: error

View File

@ -68,4 +68,9 @@ jobs:
- uses: actions/checkout@v2
- uses: ./.github/actions/apple
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-demo-macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/demo/macos

View File

@ -49,3 +49,8 @@ jobs:
- uses: ./.github/actions/apple
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-demo-macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/demo/macos