diff --git a/.github/workflows/rebase.yml b/.github/workflows/alpha.yml similarity index 93% rename from .github/workflows/rebase.yml rename to .github/workflows/alpha.yml index b3f1b2e1..4809cb27 100644 --- a/.github/workflows/rebase.yml +++ b/.github/workflows/alpha.yml @@ -1,13 +1,13 @@ -name: Altstore 2.0 rebase build +name: Alpha SideStore build on: push: branches: + # - alpha - rebase-2.0-wip -# permissions: - # contents: write + jobs: build: - name: Build and upload SideStore 0.6.0-rebase + name: Build and upload SideStore Alpha releases concurrency: group: ${{ github.ref }} cancel-in-progress: true @@ -21,6 +21,9 @@ jobs: runs-on: ${{ matrix.os }} steps: + - name: Set current build as ALPHA + run: echo "IS_ALPHA=1" >> $GITHUB_ENV + - name: Checkout code uses: actions/checkout@v4 with: @@ -29,18 +32,21 @@ jobs: - name: Install dependencies run: brew install ldid - - name: Cache .rebase-build-num + - name: Install xcbeautify + run: brew install xcbeautify + + - name: Cache .alpha-build-num uses: actions/cache@v4 with: - path: .rebase-build-num - key: rebase-build-num + path: .alpha-build-num + key: alpha-build-num - name: Get version id: version-marketing run: echo "VERSION_IPA=$(grep MARKETING_VERSION Build.xcconfig | sed -e "s/MARKETING_VERSION = //g")" >> $GITHUB_ENV - - name: Increase rebase build number and set as version - run: bash .github/workflows/increase-rebase-build-num.sh + - name: Increase alpha build number and set as version + run: bash .github/workflows/increase-alpha-build-num.sh - name: Get version id: version @@ -59,6 +65,10 @@ jobs: with: key: xcode-cache-deriveddata-${{ github.sha }} restore-keys: xcode-cache-deriveddata- + swiftpm-cache-key: xcode-cache-sourcedata-${{ github.sha }} + swiftpm-cache-restore-keys: | + xcode-cache-sourcedata- + - name: Restore Pods from Cache (Exact match) id: pods-restore @@ -122,11 +132,9 @@ jobs: ls -la ~/Library/Developer/Xcode/DerivedData || true # List contents if directory exists echo "" - - name: Set current build as ALPHA - run: echo "IS_ALPHA=1" >> $GITHUB_ENV - name: Build SideStore - run: make build | xcpretty && exit ${PIPESTATUS[0]} + run: NSUnbufferedIO=YES make build 2>&1 | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]} - name: Fakesign app run: make fakesign diff --git a/.github/workflows/increase-alpha-build-num.sh b/.github/workflows/increase-alpha-build-num.sh new file mode 100644 index 00000000..46963873 --- /dev/null +++ b/.github/workflows/increase-alpha-build-num.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# Ensure we are in root directory +cd "$(dirname "$0")/../.." + +DATE=`date -u +'%Y.%m.%d'` +BUILD_NUM=1 + +write() { + sed -e "/MARKETING_VERSION = .*/s/$/-alpha.$DATE.$BUILD_NUM+$(git rev-parse --short HEAD)/" -i '' Build.xcconfig + echo "$DATE,$BUILD_NUM" > .alpha-build-num +} + +if [ ! -f ".alpha-build-num" ]; then + write + exit 0 +fi + +LAST_DATE=`cat .alpha-build-num | perl -n -e '/([^,]*),([^ ]*)$/ && print $1'` +LAST_BUILD_NUM=`cat .alpha-build-num | perl -n -e '/([^,]*),([^ ]*)$/ && print $2'` + +if [[ "$DATE" != "$LAST_DATE" ]]; then + write +else + BUILD_NUM=`expr $LAST_BUILD_NUM + 1` + write +fi + diff --git a/.github/workflows/increase-rebase-build-num.sh b/.github/workflows/increase-rebase-build-num.sh deleted file mode 100644 index 9d1f686a..00000000 --- a/.github/workflows/increase-rebase-build-num.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -# Ensure we are in root directory -cd "$(dirname "$0")/../.." - -DATE=`date -u +'%Y.%m.%d'` -BUILD_NUM=1 - -write() { - sed -e "/MARKETING_VERSION = .*/s/$/-rebase.$DATE.$BUILD_NUM+$(git rev-parse --short HEAD)/" -i '' Build.xcconfig - echo "$DATE,$BUILD_NUM" > .rebase-build-num -} - -if [ ! -f ".rebase-build-num" ]; then - write - exit 0 -fi - -LAST_DATE=`cat .rebase-build-num | perl -n -e '/([^,]*),([^ ]*)$/ && print $1'` -LAST_BUILD_NUM=`cat .rebase-build-num | perl -n -e '/([^,]*),([^ ]*)$/ && print $2'` - -if [[ "$DATE" != "$LAST_DATE" ]]; then - write -else - BUILD_NUM=`expr $LAST_BUILD_NUM + 1` - write -fi -