1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-30 10:24:24 +02:00
Files
GPXSee/.github/workflows/osx.yml
2025-07-11 19:36:44 +02:00

60 lines
2.1 KiB
YAML

name: OS X
on:
push:
branches:
- master
jobs:
build:
name: GPXSee
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.9.1'
modules: qtpositioning qtserialport qtimageformats
- name: Create localization
run: lrelease gpxsee.pro
- name: Configure build
run: qmake gpxsee.pro QMAKE_APPLE_DEVICE_ARCHS="x86_64h arm64"
- name: Build project
run: make -j3
- name: Get latest QtPBFImagePlugin run-id
id: runid
run: echo "runid=$(gh run list --repo tumic0/QtPBFImagePlugin --workflow 'OS X' --limit 1 --json databaseId -q '.[0].databaseId')" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ github.token }}
- name: Download QtPBFImagePlugin
uses: actions/download-artifact@v4
with:
name: libpbf.dylib
github-token: ${{ github.token }}
repository: tumic0/QtPBFImagePlugin
path: GPXSee.app/Contents/Plugins/imageformats
merge-multiple: true
run-id: ${{ steps.runid.outputs.runid }}
- name: Install codesigning certificate
env:
CODESIGN_MAC: ${{ secrets.CODESIGN_MAC }}
run: |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
echo -n "$CODESIGN_MAC" | base64 --decode -o $CERTIFICATE_PATH
security create-keychain -p password $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p password $KEYCHAIN_PATH
security import $CERTIFICATE_PATH -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -k password $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Create DMG
run: macdeployqt GPXSee.app -dmg -appstore-compliant -codesign=GPXSee
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: GPXSee.dmg
name: GPXSee.dmg