mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-27 23:47:39 +01:00
91 lines
3.0 KiB
YAML
91 lines
3.0 KiB
YAML
name: Pull Request SideStore build
|
|
|
|
on:
|
|
pull_request:
|
|
# types: [opened, synchronize, reopened, ready_for_review, converted_to_draft]
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
|
|
concurrency:
|
|
group: pr-${{ github.event.pull_request.number }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and upload SideStore
|
|
if: ${{ github.event.pull_request.draft == false }}
|
|
runs-on: macos-26
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 1 # shallow clone just for PR
|
|
|
|
- run: brew install ldid xcbeautify
|
|
|
|
- name: Setup Env
|
|
run: |
|
|
MARKETING_VERSION=$(python3 scripts/ci/workflow.py get-marketing-version)
|
|
SHORT_COMMIT=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})
|
|
QUALIFIED_VERSION="${MARKETING_VERSION}-pr.${{ github.event.pull_request.number }}+${SHORT_COMMIT}"
|
|
python3 scripts/ci/workflow.py set-marketing-version "$QUALIFIED_VERSION"
|
|
echo "SHORT_COMMIT=$SHORT_COMMIT" | tee -a $GITHUB_ENV
|
|
echo "MARKETING_VERSION=$QUALIFIED_VERSION" | tee -a $GITHUB_ENV
|
|
|
|
- name: Setup Xcode
|
|
uses: maxim-lobanov/setup-xcode@v1.6.0
|
|
with:
|
|
xcode-version: "26.2"
|
|
|
|
- name: Restore Cache (exact)
|
|
id: xcode-cache-exact
|
|
uses: actions/cache/restore@v3
|
|
with:
|
|
path: |
|
|
~/Library/Developer/Xcode/DerivedData
|
|
~/Library/Caches/org.swift.swiftpm
|
|
key: xcode-build-cache-${{ github.ref_name }}-${{ github.sha }}
|
|
|
|
- name: Restore Cache (last)
|
|
if: steps.xcode-cache-exact.outputs.cache-hit != 'true'
|
|
id: xcode-cache-fallback
|
|
uses: actions/cache/restore@v3
|
|
with:
|
|
path: |
|
|
~/Library/Developer/Xcode/DerivedData
|
|
~/Library/Caches/org.swift.swiftpm
|
|
key: xcode-build-cache-${{ github.ref_name }}-
|
|
|
|
- name: Build
|
|
env:
|
|
BUILD_LOG_ZIP_PASSWORD: ${{ secrets.BUILD_LOG_ZIP_PASSWORD }}
|
|
run: |
|
|
python3 scripts/ci/workflow.py build; STATUS=$?
|
|
python3 scripts/ci/workflow.py encrypt-build
|
|
mv SideStore.ipa SideStore-${{ env.MARKETING_VERSION }}.ipa
|
|
exit $STATUS
|
|
|
|
- name: Save Cache
|
|
if: ${{ steps.xcode-cache-fallback.outputs.cache-hit != 'true' }}
|
|
uses: actions/cache/save@v3
|
|
with:
|
|
path: |
|
|
~/Library/Developer/Xcode/DerivedData
|
|
~/Library/Caches/org.swift.swiftpm
|
|
key: xcode-build-cache-${{ github.ref_name }}-${{ github.sha }}
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: encrypted-build-logs-${{ env.MARKETING_VERSION }}.zip
|
|
path: encrypted-build-logs.zip
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: SideStore-${{ env.MARKETING_VERSION }}.ipa
|
|
path: SideStore-${{ env.MARKETING_VERSION }}.ipa
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: SideStore-${{ env.MARKETING_VERSION }}-dSYMs.zip
|
|
path: SideStore.dSYMs.zip
|