Skip to content

update workflows

update workflows #87

Workflow file for this run

name: macOS
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
strategy:
matrix:
os: ["macos-latest"]
include:
- os: macos-latest
binary_path: Client/build/SonyHeadphonesClient.zip
artifact_name: "SonyHeadphonesClient-macOS.zip"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Create build directory
working-directory: ${{github.workspace}}/Client
run: mkdir build
- name: Build
working-directory: ${{github.workspace}}/Client/build
# Execute the build.
run: xcodebuild -project '../macos/SonyHeadphonesClient.xcodeproj' -config Release -scheme 'SonyHeadphonesClient' -archivePath ./archive archive | xcpretty
- name: Export archive to .app
working-directory: ${{github.workspace}}/Client/build
# Exports the archive to a .app file
run: xcodebuild -exportArchive -archivePath ./archive.xcarchive -exportPath ./ -exportOptionsPlist ../macos/exportOptions.plist | xcpretty
- name: Zip the exported file
working-directory: ${{github.workspace}}/Client/build
# Zip the application for easier downloading
run: zip -r SonyHeadphonesClient.zip SonyHeadphonesClient.app
- name: Upload the zipped application
uses: actions/upload-artifact@v3
with:
# Artifact name
name: ${{ matrix.artifact_name }}
# A file, directory or wildcard pattern that describes what to upload
path: ${{github.workspace}}/${{matrix.binary_path}}
# The desired behavior if no files are found using the provided path.