mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-04 16:11:28 +00:00
6fc8310705
Make multiple improvements to the existing workflows: - create a shared custom action to deal with version number tracking and generation; - use this action to add the branch name to the version for pull request builds; - create a shared workflow for all debian-ish builds to avoid re-use by copy / paste; - remove potential security risks by eliminating the use of pre-evaluated expressions (`${{ ... }}`) inside scripts; - update outdated GitHub action versions; - improve the consistency by renaming scripts acording to have a `.sh` extension; - improve naming of generated artefacts for pull requests to include the correct version. @dirkh: Unfortunately this is potentially going to break builds when it is merged, as there is no good way to 'test' a merge build short of merging. We'll just have to deal with the fallout of it in a follow-up pull request. Signed-off-by: Michael Keller <github@ike.ch>
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
name: iOS
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- scripts/docker/**
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
paths-ignore:
|
|
- scripts/docker/**
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: macOS-11
|
|
steps:
|
|
- name: switch to Xcode 11
|
|
run: sudo xcode-select -s "/Applications/Xcode_11.7.app"
|
|
|
|
- name: checkout sources
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
|
|
- name: setup Homebrew
|
|
run: brew install autoconf automake libtool pkg-config
|
|
|
|
- name: checkout Qt resources
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: subsurface/qt-ios
|
|
ref: main
|
|
path: qt-ios
|
|
|
|
- name: set the version information
|
|
id: version_number
|
|
uses: ./.github/actions/manage-version
|
|
with:
|
|
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
|
|
|
- name: build Subsurface-mobile for iOS
|
|
env:
|
|
VERSION: ${{ steps.version_number.outputs.version }}
|
|
run: |
|
|
cd ..
|
|
git config --global --add safe.directory $GITHUB_WORKSPACE
|
|
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
|
export IOS_QT=$GITHUB_WORKSPACE/qt-ios
|
|
echo "build for simulator"
|
|
bash -x $GITHUB_WORKSPACE/packaging/ios/build.sh -simulator
|
|
# We need this in order to be able to access the file and publish it
|
|
mv build-Subsurface-mobile-Qt_5_14_1_for_iOS-Release/Release-iphonesimulator/Subsurface-mobile.app $GITHUB_WORKSPACE/Subsurface-mobile-$VERSION.app
|
|
|
|
- name: publish artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Subsurface-iOS-${{ steps.version_number.outputs.version }}
|
|
path: Subsurface-mobile-*.app
|