cleanup actions, revamp beta action, modify nightly build num system to be day specific

This commit is contained in:
naturecodevoid
2023-02-21 12:23:12 -08:00
parent 6f8c27793e
commit 173c585f2d
6 changed files with 67 additions and 92 deletions

View File

@@ -1,16 +1,12 @@
name: Beta SideStore build name: Beta SideStore build
on: on:
push: push:
branches: tags:
- develop - '[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' # example: 1.0.0-beta.1
jobs: jobs:
build: build:
name: Build and upload SideStore Beta name: Build and upload SideStore Beta
if: startsWith(github.event.head_commit.message, '[beta]')
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -28,8 +24,8 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: brew install ldid run: brew install ldid
- name: Add beta suffix to version - name: Change version to tag
run: sed -e '/MARKETING_VERSION = .*/s/$/-beta.${{ github.run_number }}/' -i '' Build.xcconfig run: sed -e '/MARKETING_VERSION = .*/s/= .*/= ${{ github.ref_name }}/' -i '' Build.xcconfig
- name: Setup Xcode - name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1.4.1 uses: maxim-lobanov/setup-xcode@v1.4.1
@@ -37,29 +33,13 @@ jobs:
xcode-version: ${{ matrix.version }} xcode-version: ${{ matrix.version }}
- name: Build SideStore - name: Build SideStore
run: | run: make build | xcpretty && exit ${PIPESTATUS[0]}
xcodebuild -project AltStore.xcodeproj \
-scheme AltStore \
-sdk iphoneos \
archive -archivePath ./archive \
CODE_SIGNING_REQUIRED=NO \
AD_HOC_CODE_SIGNING_ALLOWED=YES \
CODE_SIGNING_ALLOWED=NO \
DEVELOPMENT_TEAM=XYZ0123456 \
ORG_IDENTIFIER=com.SideStore \
| xcpretty && exit ${PIPESTATUS[0]}
- name: Fakesign app - name: Fakesign app
run: | run: make fakesign
rm -rf archive.xcarchive/Products/Applications/SideStore.app/Frameworks/AltStoreCore.framework/Frameworks/
ldid -SAltStore/Resources/tempEnt.plist archive.xcarchive/Products/Applications/SideStore.app/SideStore
- name: Convert to IPA - name: Convert to IPA
run: | run: make ipa
mkdir Payload
mkdir Payload/SideStore.app
cp -R archive.xcarchive/Products/Applications/SideStore.app/ Payload/SideStore.app/
zip -r SideStore.ipa Payload
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3.1.0 uses: actions/upload-artifact@v3.1.0
@@ -79,12 +59,13 @@ jobs:
id: date_altstore id: date_altstore
run: echo "date=$(date -u +'%Y-%m-%d')" >> $GITHUB_OUTPUT run: echo "date=$(date -u +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Upload to beta release - name: Upload to new beta release
uses: IsaacShelton/update-existing-release@v1.3.1 uses: softprops/action-gh-release@v1
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
release: "Beta" name: ${{ steps.version.outputs.version }}
tag: "beta" tag_name: ${{ github.ref_name }}
draft: true
prerelease: true prerelease: true
files: SideStore.ipa files: SideStore.ipa
body: | body: |
@@ -96,6 +77,10 @@ jobs:
If you use the `SideStore (Beta)` app, it will use the latest beta build (make sure to update it in "My Apps"). If you use the `SideStore (Beta)` app, it will use the latest beta build (make sure to update it in "My Apps").
## Changelog
- TODO
## Build Info ## Build Info
Built at (UTC): `${{ steps.date.outputs.date }}` Built at (UTC): `${{ steps.date.outputs.date }}`

View 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/$/-nightly.$DATE.$BUILD_NUM/" -i '' Build.xcconfig
echo "$DATE,$BUILD_NUM" > .nightly-build-num
}
if [ ! -f ".nightly-build-num" ]; then
write
exit 0
fi
LAST_DATE=`cat .nightly-build-num | perl -n -e '/([^,]*),([^ ]*)$/ && print $1'`
LAST_BUILD_NUM=`cat .nightly-build-num | perl -n -e '/([^,]*),([^ ]*)$/ && print $2'`
if [[ "$DATE" != "$LAST_DATE" ]]; then
write
else
BUILD_NUM=`expr $LAST_BUILD_NUM + 1`
write
fi

View File

@@ -27,8 +27,14 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: brew install ldid run: brew install ldid
- name: Add nightly suffix to version - name: Cache .nightly-build-num
run: sed -e '/MARKETING_VERSION = .*/s/$/-nightly.${{ github.run_number }}/' -i '' Build.xcconfig uses: actions/cache@v3
with:
path: .nightly-build-num
key: nightly-build-num
- name: Increase nightly build number and set as version
run: bash .github/workflows/increase-nightly-build-num.sh
- name: Setup Xcode - name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1.4.1 uses: maxim-lobanov/setup-xcode@v1.4.1
@@ -36,29 +42,13 @@ jobs:
xcode-version: ${{ matrix.version }} xcode-version: ${{ matrix.version }}
- name: Build SideStore - name: Build SideStore
run: | run: make build | xcpretty && exit ${PIPESTATUS[0]}
xcodebuild -project AltStore.xcodeproj \
-scheme AltStore \
-sdk iphoneos \
archive -archivePath ./archive \
CODE_SIGNING_REQUIRED=NO \
AD_HOC_CODE_SIGNING_ALLOWED=YES \
CODE_SIGNING_ALLOWED=NO \
DEVELOPMENT_TEAM=XYZ0123456 \
ORG_IDENTIFIER=com.SideStore \
| xcpretty && exit ${PIPESTATUS[0]}
- name: Fakesign app - name: Fakesign app
run: | run: make fakesign
rm -rf archive.xcarchive/Products/Applications/SideStore.app/Frameworks/AltStoreCore.framework/Frameworks/
ldid -SAltStore/Resources/tempEnt.plist archive.xcarchive/Products/Applications/SideStore.app/SideStore
- name: Convert to IPA - name: Convert to IPA
run: | run: make ipa
mkdir Payload
mkdir Payload/SideStore.app
cp -R archive.xcarchive/Products/Applications/SideStore.app/ Payload/SideStore.app/
zip -r SideStore.ipa Payload
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3.1.0 uses: actions/upload-artifact@v3.1.0

View File

@@ -31,29 +31,13 @@ jobs:
xcode-version: ${{ matrix.version }} xcode-version: ${{ matrix.version }}
- name: Build SideStore - name: Build SideStore
run: | run: make build | xcpretty && exit ${PIPESTATUS[0]}
xcodebuild -project AltStore.xcodeproj \
-scheme AltStore \
-sdk iphoneos \
archive -archivePath ./archive \
CODE_SIGNING_REQUIRED=NO \
AD_HOC_CODE_SIGNING_ALLOWED=YES \
CODE_SIGNING_ALLOWED=NO \
DEVELOPMENT_TEAM=XYZ0123456 \
ORG_IDENTIFIER=com.SideStore \
| xcpretty && exit ${PIPESTATUS[0]}
- name: Fakesign app - name: Fakesign app
run: | run: make fakesign
rm -rf archive.xcarchive/Products/Applications/SideStore.app/Frameworks/AltStoreCore.framework/Frameworks/
ldid -SAltStore/Resources/tempEnt.plist archive.xcarchive/Products/Applications/SideStore.app/SideStore
- name: Convert to IPA - name: Convert to IPA
run: | run: make ipa
mkdir Payload
mkdir Payload/SideStore.app
cp -R archive.xcarchive/Products/Applications/SideStore.app/ Payload/SideStore.app/
zip -r SideStore.ipa Payload
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3.1.0 uses: actions/upload-artifact@v3.1.0

View File

@@ -2,7 +2,7 @@ name: Stable SideStore build
on: on:
push: push:
tags: tags:
- '[0-9]+.[0-9]+.[0-9]+*' - '[0-9]+.[0-9]+.[0-9]+' # example: 1.0.0
jobs: jobs:
build: build:
@@ -24,35 +24,22 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: brew install ldid run: brew install ldid
- name: Change version to tag
run: sed -e '/MARKETING_VERSION = .*/s/= .*/= ${{ github.ref_name }}/' -i '' Build.xcconfig
- name: Setup Xcode - name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1.4.1 uses: maxim-lobanov/setup-xcode@v1.4.1
with: with:
xcode-version: ${{ matrix.version }} xcode-version: ${{ matrix.version }}
- name: Build SideStore - name: Build SideStore
run: | run: make build | xcpretty && exit ${PIPESTATUS[0]}
xcodebuild -project AltStore.xcodeproj \
-scheme AltStore \
-sdk iphoneos \
archive -archivePath ./archive \
CODE_SIGNING_REQUIRED=NO \
AD_HOC_CODE_SIGNING_ALLOWED=YES \
CODE_SIGNING_ALLOWED=NO \
DEVELOPMENT_TEAM=XYZ0123456 \
ORG_IDENTIFIER=com.SideStore \
| xcpretty && exit ${PIPESTATUS[0]}
- name: Fakesign app - name: Fakesign app
run: | run: make fakesign
rm -rf archive.xcarchive/Products/Applications/SideStore.app/Frameworks/AltStoreCore.framework/Frameworks/
ldid -SAltStore/Resources/tempEnt.plist archive.xcarchive/Products/Applications/SideStore.app/SideStore
- name: Convert to IPA - name: Convert to IPA
run: | run: make ipa
mkdir Payload
mkdir Payload/SideStore.app
cp -R archive.xcarchive/Products/Applications/SideStore.app/ Payload/SideStore.app/
zip -r SideStore.ipa Payload
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3.1.0 uses: actions/upload-artifact@v3.1.0
@@ -77,7 +64,7 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.version.outputs.version }} name: ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref }} tag_name: ${{ github.ref_name }}
draft: true draft: true
files: SideStore.ipa files: SideStore.ipa
body: | body: |

1
.gitignore vendored
View File

@@ -41,3 +41,4 @@ Dependencies/.*-prebuilt-fetch-*
Dependencies/minimuxer/* Dependencies/minimuxer/*
Dependencies/em_proxy/* Dependencies/em_proxy/*
!Dependencies/**/.gitkeep !Dependencies/**/.gitkeep
.nightly-build-num