mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-23 15:14:24 +02:00
60 lines
2.1 KiB
YAML
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:
|
|
MACOS_CERTIFICATE: ${{ secrets.CODESIGN_CERT }}
|
|
MACOS_CERTIFICATE_PWD: ${{ secrets.CODESIGN_PWD }}
|
|
KEYCHAIN_NAME: gpxsee
|
|
KEYCHAIN_PWD: password
|
|
run: |
|
|
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
|
|
security create-keychain -p $KEYCHAIN_PWD $KEYCHAIN_NAME
|
|
security default-keychain -s $KEYCHAIN_NAME
|
|
security unlock-keychain -p $KEYCHAIN_PWD $KEYCHAIN_NAME
|
|
security import certificate.p12 -k $KEYCHAIN_NAME -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
|
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PWD $KEYCHAIN_NAME
|
|
- 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
|