Skip to content

fix: ensure default quality profile is set when none is found #38

fix: ensure default quality profile is set when none is found

fix: ensure default quality profile is set when none is found #38

Workflow file for this run

name: MacOS Build
on:
pull_request:
push:
jobs:
build:
strategy:
matrix:
os: [macOS-latest]
arch: [arm64]
mode: [debug, release]
runs-on: ${{ matrix.os }}
if: ${{ !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'ci linux') && !contains(github.event.head_commit.message, 'ci windows') && !contains(github.event.head_commit.message, 'ci switch') }}
steps:
- name: Checkout code
uses: actions/checkout@v4
# Force xmake to a specific folder (for cache)
- name: Set xmake env
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
actions-cache-folder: .xmake-cache-W${{ steps.cache_key.outputs.key }}
# Update xmake repository (in order to have the file that will be cached)
- name: Update xmake repository
run: xmake repo --update
# Fetch xmake dephash
- name: Retrieve dependencies hash
id: dep_hash
run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT
# Cache xmake dependencies
- name: Restore cached xmake dependencies
id: restore-depcache
uses: actions/cache/restore@v4
with:
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
key: macOS-${{ matrix.arch }}-${{ matrix.confs.mode }}${{ matrix.confs.cache_key }}-${{ steps.dep_hash.outputs.hash }}-W${{ steps.cache_key.outputs.key }}
- name: Configure xmake and install dependencies
run: xmake config --mode=${{ matrix.mode }} --ccache=n --yes
# Save dependencies
- name: Save cached xmake dependencies
if: ${{ !steps.restore-depcache.outputs.cache-hit }}
uses: actions/cache/save@v4
with:
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
- name: Build Switchseerr
run: xmake --yes
- name: Install Switchseerr
run: xmake install -o Switchseerr.app
- name: "Set PACKAGE_NAME variable"
run: echo "PACKAGE_NAME=macOS_${{ matrix.arch }}_${{ matrix.mode }}.zip" >> $GITHUB_ENV
shell: bash
- name: Archive .app bundle
run: zip -r $PACKAGE_NAME Switchseerr.app
- uses: actions/upload-artifact@v4
with:
name: Switchseerr-macos-${{ matrix.arch }}-${{ matrix.mode }}
path: ${{ env.PACKAGE_NAME }}