Skip to content

Commit

Permalink
Git migration to iTorrent 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
XITRIX committed Jul 10, 2024
1 parent 5e86bd5 commit ca36e7a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 38 deletions.
46 changes: 11 additions & 35 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,19 @@ jobs:
env:
FIREBASE_INFO_PLIST_BASE64: ${{ secrets.FIREBASE_INFO_PLIST_BASE64 }}
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
BUILD_DISTRIB_CERTIFICATE_BASE64: ${{ secrets.BUILD_DISTRIB_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
BUILD_CERTIFICATE_PASSWORD: ${{ secrets.BUILD_CERTIFICATE_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
BUILD_PROVISION_PROFILE_DISTRIB_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_DISTRIB_BASE64 }}
BUILD_PROVISION_PROFILE_PROD_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_PROD_BASE64 }}
BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_BASE64 }}
BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_DISTRIB_BASE64: ${{ secrets.BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_DISTRIB_BASE64 }}
BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_PROD_BASE64: ${{ secrets.BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_PROD_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
FIREBASE_INFO_PLIST_PATH=iTorrent/Core/Assets/GoogleService-Info.plist
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
CERTIFICATE_DISTRIB_PATH=$RUNNER_TEMP/build_distrib_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
PP_DISTRIB_PATH=$RUNNER_TEMP/build_pp_distrib.mobileprovision
PP_PROD_PATH=$RUNNER_TEMP/build_pp_prod.mobileprovision
PW_PP_PATH=$RUNNER_TEMP/build_progresswidget_pp.mobileprovision
PW_PP_DISTRIB_PATH=$RUNNER_TEMP/build_progresswidget_pp_distrib.mobileprovision
PW_PP_PROD_PATH=$RUNNER_TEMP/build_progresswidget_pp_prod.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
Expand All @@ -59,12 +53,9 @@ jobs:
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$BUILD_DISTRIB_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_DISTRIB_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
echo -n "$BUILD_PROVISION_PROFILE_DISTRIB_BASE64" | base64 --decode -o $PP_DISTRIB_PATH
echo -n "$BUILD_PROVISION_PROFILE_PROD_BASE64" | base64 --decode -o $PP_PROD_PATH
echo -n "$BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_BASE64" | base64 --decode -o $PW_PP_PATH
echo -n "$BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_DISTRIB_BASE64" | base64 --decode -o $PW_PP_DISTRIB_PATH
echo -n "$BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_PROD_BASE64" | base64 --decode -o $PW_PP_PROD_PATH
# create temporary keychain
Expand All @@ -73,18 +64,15 @@ jobs:
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security import $CERTIFICATE_DISTRIB_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security import $CERTIFICATE_PATH -P "$BUILD_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_DISTRIB_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PROD_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PROD_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PW_PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PW_PP_DISTRIB_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PW_PP_PROD_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PW_PP_PROD_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Fix build number
run: |
Expand Down Expand Up @@ -134,35 +122,26 @@ jobs:
- name: Install the Apple certificate and provisioning profile
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
BUILD_DISTRIB_CERTIFICATE_BASE64: ${{ secrets.BUILD_DISTRIB_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
BUILD_CERTIFICATE_PASSWORD: ${{ secrets.BUILD_CERTIFICATE_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
BUILD_PROVISION_PROFILE_DISTRIB_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_DISTRIB_BASE64 }}
BUILD_PROVISION_PROFILE_PROD_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_PROD_BASE64 }}
BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_BASE64 }}
BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_DISTRIB_BASE64: ${{ secrets.BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_DISTRIB_BASE64 }}
BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_PROD_BASE64: ${{ secrets.BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_PROD_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
CERTIFICATE_DISTRIB_PATH=$RUNNER_TEMP/build_distrib_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
PP_DISTRIB_PATH=$RUNNER_TEMP/build_pp_distrib.mobileprovision
PP_PROD_PATH=$RUNNER_TEMP/build_pp_prod.mobileprovision
PW_PP_PATH=$RUNNER_TEMP/build_progresswidget_pp.mobileprovision
PW_PP_DISTRIB_PATH=$RUNNER_TEMP/build_progresswidget_pp_distrib.mobileprovision
PW_PP_PROD_PATH=$RUNNER_TEMP/build_progresswidget_pp_prod.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$BUILD_DISTRIB_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_DISTRIB_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
echo -n "$BUILD_PROVISION_PROFILE_DISTRIB_BASE64" | base64 --decode -o $PP_DISTRIB_PATH
echo -n "$BUILD_PROVISION_PROFILE_PROD_BASE64" | base64 --decode -o $PP_PROD_PATH
echo -n "$BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_BASE64" | base64 --decode -o $PW_PP_PATH
echo -n "$BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_DISTRIB_BASE64" | base64 --decode -o $PW_PP_DISTRIB_PATH
echo -n "$BUILD_PROGRESS_WIDGET_PROVISION_PROFILE_PROD_BASE64" | base64 --decode -o $PW_PP_PROD_PATH
# create temporary keychain
Expand All @@ -171,18 +150,15 @@ jobs:
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security import $CERTIFICATE_DISTRIB_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security import $CERTIFICATE_PATH -P "$BUILD_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_DISTRIB_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PROD_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PROD_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PW_PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PW_PP_DISTRIB_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PW_PP_PROD_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PW_PP_PROD_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Export ipa
env:
Expand Down Expand Up @@ -278,4 +254,4 @@ jobs:
- name: Upload app to TestFlight
run: |
# xcrun altool --upload-package app-Release-prod/build/iTorrent.ipa --apiKey ${{ secrets.APPSTORE_CONNECT_KEY_ID }} --apiIssuer ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }}
xcrun altool --upload-app -f app-Release-prod/build/iTorrent.ipa --apiKey ${{ secrets.APPSTORE_CONNECT_KEY_ID }} --apiIssuer ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }} -t ios
xcrun altool --upload-app -f app-Release-prod/build/iTorrent.ipa --apiKey ${{ secrets.APPSTORE_CONNECT_KEY_ID }} --apiIssuer ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }} -t ios
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Git migration to iTorrent 2.0 in progress

[![AltStore Button]][AltStore Link]
[![SideStore Button]][SideStore Link]
[![Jailbreak Button]][Jailbreak Link]
Expand Down
6 changes: 3 additions & 3 deletions iTorrent.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -1932,7 +1932,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -2072,7 +2072,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down

0 comments on commit ca36e7a

Please sign in to comment.