mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[CI]: update rebase.yml to alpha.yml
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
name: Altstore 2.0 rebase build
|
name: Alpha SideStore build
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
# - alpha
|
||||||
- rebase-2.0-wip
|
- rebase-2.0-wip
|
||||||
# permissions:
|
|
||||||
# contents: write
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build and upload SideStore 0.6.0-rebase
|
name: Build and upload SideStore Alpha releases
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.ref }}
|
group: ${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -21,6 +21,9 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
- name: Set current build as ALPHA
|
||||||
|
run: echo "IS_ALPHA=1" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -29,18 +32,21 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: brew install ldid
|
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
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: .rebase-build-num
|
path: .alpha-build-num
|
||||||
key: rebase-build-num
|
key: alpha-build-num
|
||||||
|
|
||||||
- name: Get version
|
- name: Get version
|
||||||
id: version-marketing
|
id: version-marketing
|
||||||
run: echo "VERSION_IPA=$(grep MARKETING_VERSION Build.xcconfig | sed -e "s/MARKETING_VERSION = //g")" >> $GITHUB_ENV
|
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
|
- name: Increase alpha build number and set as version
|
||||||
run: bash .github/workflows/increase-rebase-build-num.sh
|
run: bash .github/workflows/increase-alpha-build-num.sh
|
||||||
|
|
||||||
- name: Get version
|
- name: Get version
|
||||||
id: version
|
id: version
|
||||||
@@ -59,6 +65,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
key: xcode-cache-deriveddata-${{ github.sha }}
|
key: xcode-cache-deriveddata-${{ github.sha }}
|
||||||
restore-keys: xcode-cache-deriveddata-
|
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)
|
- name: Restore Pods from Cache (Exact match)
|
||||||
id: pods-restore
|
id: pods-restore
|
||||||
@@ -122,11 +132,9 @@ jobs:
|
|||||||
ls -la ~/Library/Developer/Xcode/DerivedData || true # List contents if directory exists
|
ls -la ~/Library/Developer/Xcode/DerivedData || true # List contents if directory exists
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
- name: Set current build as ALPHA
|
|
||||||
run: echo "IS_ALPHA=1" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build SideStore
|
- 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
|
- name: Fakesign app
|
||||||
run: make fakesign
|
run: make fakesign
|
||||||
28
.github/workflows/increase-alpha-build-num.sh
vendored
Normal file
28
.github/workflows/increase-alpha-build-num.sh
vendored
Normal file
@@ -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
|
||||||
|
|
||||||
28
.github/workflows/increase-rebase-build-num.sh
vendored
28
.github/workflows/increase-rebase-build-num.sh
vendored
@@ -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
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user