mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-27 15:37:40 +01:00
136 lines
4.0 KiB
YAML
136 lines
4.0 KiB
YAML
name: Stable SideStore build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '[0-9]+.[0-9]+.[0-9]+'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Build SideStore - stable
|
|
runs-on: macos-26
|
|
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
CHANNEL: stable
|
|
UPSTREAM_CHANNEL: ""
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: Find Last Successful commit
|
|
run: |
|
|
LAST_SUCCESSFUL_COMMIT=$(python3 scripts/ci/workflow.py last-successful-commit \
|
|
"true" || echo "")
|
|
echo "LAST_SUCCESSFUL_COMMIT=$LAST_SUCCESSFUL_COMMIT" | tee -a $GITHUB_ENV
|
|
|
|
- run: brew install ldid xcbeautify
|
|
|
|
- name: Setup Env
|
|
run: |
|
|
MARKETING_VERSION=$(python3 scripts/ci/workflow.py get-marketing-version)
|
|
SHORT_COMMIT=$(python3 scripts/ci/workflow.py commit-id)
|
|
|
|
if [ "$MARKETING_VERSION" != "${{ github.ref_name }}" ]; then
|
|
echo "Version mismatch"
|
|
echo "Build.xcconfig: $MARKETING_VERSION"
|
|
echo "Tag: ${{ github.ref_name }}"
|
|
exit 1
|
|
fi
|
|
|
|
echo "MARKETING_VERSION=$MARKETING_VERSION" | tee -a $GITHUB_ENV
|
|
echo "SHORT_COMMIT=$SHORT_COMMIT" | tee -a $GITHUB_ENV
|
|
|
|
- name: Setup Xcode
|
|
uses: maxim-lobanov/setup-xcode@v1.6.0
|
|
with:
|
|
xcode-version: "26.0"
|
|
|
|
- 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-stable-${{ 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-stable-
|
|
|
|
- name: Build
|
|
id: 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
|
|
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-stable-${{ github.sha }}
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-logs-${{ env.MARKETING_VERSION }}.zip
|
|
path: build-logs.zip
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: SideStore-${{ env.MARKETING_VERSION }}.ipa
|
|
path: SideStore.ipa
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: SideStore-${{ env.MARKETING_VERSION }}-dSYMs.zip
|
|
path: SideStore.dSYMs.zip
|
|
|
|
- name: Generate Metadata
|
|
run: |
|
|
python3 scripts/ci/workflow.py dump-project-settings
|
|
PRODUCT_NAME=$(python3 scripts/ci/workflow.py read-product-name)
|
|
BUNDLE_ID=$(python3 scripts/ci/workflow.py read-bundle-id)
|
|
IPA_NAME="$PRODUCT_NAME.ipa"
|
|
|
|
python3 scripts/ci/workflow.py generate-metadata \
|
|
"${{ github.ref_name }}" \
|
|
"$SHORT_COMMIT" \
|
|
"$MARKETING_VERSION" \
|
|
"$CHANNEL" \
|
|
"$BUNDLE_ID" \
|
|
"$IPA_NAME" \
|
|
"$LAST_SUCCESSFUL_COMMIT"
|
|
|
|
- name: Upload to releases
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
python3 scripts/ci/workflow.py upload-release \
|
|
"${{ github.ref_name }}" \
|
|
"${{ github.ref_name }}" \
|
|
"$GITHUB_SHA" \
|
|
"$GITHUB_REPOSITORY" \
|
|
"$UPSTREAM_CHANNEL" \
|
|
"true"
|