Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
saagarjha committed Feb 24, 2024
1 parent 9e55410 commit 52eb273
Showing 1 changed file with 66 additions and 66 deletions.
132 changes: 66 additions & 66 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,88 +22,88 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Sanity check
run: |
set -x
# - name: Sanity check
# run: |
# set -x

version="$(cat Configs/Deployment.xcconfig | grep CURRENT_PROJECT_VERSION | awk '{ print $3 }')"
# version="$(cat Configs/Deployment.xcconfig | grep CURRENT_PROJECT_VERSION | awk '{ print $3 }')"

# Make sure this version doesn't exist already
! git tag --list | grep -q "v$version"
# # Make sure this version doesn't exist already
# ! git tag --list | grep -q "v$version"

# Check that the commit message matches the version
git log -1 --pretty=%B | grep "\($version\)"
# # Check that the commit message matches the version
# git log -1 --pretty=%B | grep "\($version\)"

- name: Create App Store Connect Key file
run: echo "${{ secrets.APP_STORE_CONNECT_KEY }}" | base64 -d > /tmp/AuthKey.p8
# - name: Create App Store Connect Key file
# run: echo "${{ secrets.APP_STORE_CONNECT_KEY }}" | base64 -d > /tmp/AuthKey.p8

- name: Set up signing
run: |
KEYCHAIN="$RUNNER_TEMP/keychain.keychain-db"
KEYCHAIN_PASSWORD=password
# - name: Set up signing
# run: |
# KEYCHAIN="$RUNNER_TEMP/keychain.keychain-db"
# KEYCHAIN_PASSWORD=password

echo "${{ secrets.CERTIFICATE }}" | base64 -d > "$RUNNER_TEMP/Certificate.p12"
# echo "${{ secrets.CERTIFICATE }}" | base64 -d > "$RUNNER_TEMP/Certificate.p12"

security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
security set-keychain-settings "$KEYCHAIN"
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
security list-keychains -d user -s "$KEYCHAIN"
security import "$RUNNER_TEMP/Certificate.p12" -P "${{ secrets.CERTIFICATE_PASSWORD }}" -A -k "$KEYCHAIN"
# security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
# security set-keychain-settings "$KEYCHAIN"
# security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
# security list-keychains -d user -s "$KEYCHAIN"
# security import "$RUNNER_TEMP/Certificate.p12" -P "${{ secrets.CERTIFICATE_PASSWORD }}" -A -k "$KEYCHAIN"

mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp Release/iOS.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles
# mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
# cp Release/iOS.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_15.2.app
# - name: Select Xcode
# run: sudo xcode-select -s /Applications/Xcode_15.2.app

- name: System Info
run: |
uname -a
xcodebuild -version
# - name: System Info
# run: |
# uname -a
# xcodebuild -version

- name: Archive macOS
run: xcodebuild -scheme macOS -archivePath macOS.xcarchive archive
# - name: Archive macOS
# run: xcodebuild -scheme macOS -archivePath macOS.xcarchive archive

- name: Archive visionOS
run: xcodebuild -scheme visionOS -archivePath visionOS.xcarchive archive
# - name: Archive visionOS
# run: xcodebuild -scheme visionOS -archivePath visionOS.xcarchive archive

- name: Collect Assets
run: |
(
cd macOS.xcarchive/Products/Applications/
zip -r macOS.zip Ensemble.app
mv macOS.zip ../../..
)
(
cd macOS.xcarchive/dSYMs/
zip -r macOS-symbols.zip Ensemble.app.dSYM/
mv macOS-symbols.zip ../..
)
(
cd visionOS.xcarchive/Products/Applications/
zip -r visionOS.zip Ensemble.app
mv visionOS.zip ../../..
)
(
cd visionOS.xcarchive/dSYMs/
zip -r visionOS-symbols.zip Ensemble.app.dSYM/
mv visionOS-symbols.zip ../..
)
- name: Create Release
run: |
version="$(cat Configs/Deployment.xcconfig | grep CURRENT_PROJECT_VERSION | awk '{ print $3 }')"
# - name: Collect Assets
# run: |
# (
# cd macOS.xcarchive/Products/Applications/
# zip -r macOS.zip Ensemble.app
# mv macOS.zip ../../..
# )

# (
# cd macOS.xcarchive/dSYMs/
# zip -r macOS-symbols.zip Ensemble.app.dSYM/
# mv macOS-symbols.zip ../..
# )

# (
# cd visionOS.xcarchive/Products/Applications/
# zip -r visionOS.zip Ensemble.app
# mv visionOS.zip ../../..
# )

# (
# cd visionOS.xcarchive/dSYMs/
# zip -r visionOS-symbols.zip Ensemble.app.dSYM/
# mv visionOS-symbols.zip ../..
# )

# - name: Create Release
# run: |
# version="$(cat Configs/Deployment.xcconfig | grep CURRENT_PROJECT_VERSION | awk '{ print $3 }')"

gh release create "v$version" -t "Build $version" -p macOS.zip macOS-symbols.zip visionOS.zip visionOS-symbols.zip
# gh release create "v$version" -t "Build $version" -p macOS.zip macOS-symbols.zip visionOS.zip visionOS-symbols.zip

- name: Upload macOS
run: xcodebuild $XCODEBUILD_EXTRA_ARGS -exportArchive -exportOptionsPlist Release/ExportOptions.plist -archivePath macOS.xcarchive/ -exportPath macOS
# - name: Upload macOS
# run: xcodebuild $XCODEBUILD_EXTRA_ARGS -exportArchive -exportOptionsPlist Release/ExportOptions.plist -archivePath macOS.xcarchive/ -exportPath macOS

- name: Upload visionOS
run: xcodebuild $XCODEBUILD_EXTRA_ARGS -exportArchive -exportOptionsPlist Release/ExportOptions.plist -archivePath visionOS.xcarchive/ -exportPath visionOS
# - name: Upload visionOS
# run: xcodebuild $XCODEBUILD_EXTRA_ARGS -exportArchive -exportOptionsPlist Release/ExportOptions.plist -archivePath visionOS.xcarchive/ -exportPath visionOS

- name: Send to TestFlight
env:
Expand Down

0 comments on commit 52eb273

Please sign in to comment.