Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:

steps:
- name: Verify Xcode 27 toolchain
id: xcode
run: |
xcode_version="$(xcodebuild -version | awk '/^Xcode / { print $2 }')"
xcodebuild -version
Expand All @@ -34,6 +35,12 @@ jobs:
exit 1
fi

{
echo "package_cache_path=$RUNNER_TEMP/quorra-package-cache"
echo "source_packages_path=$RUNNER_TEMP/quorra-source-packages"
echo "version=$xcode_version"
} >> "$GITHUB_OUTPUT"

- name: Create release automation token
id: release-token
uses: actions/create-github-app-token@v3
Expand Down Expand Up @@ -108,6 +115,19 @@ jobs:
with:
ref: ${{ steps.release-context.outputs.tag }}

- name: Restore Swift package cache
id: swift-package-cache
if: ${{ steps.release-context.outputs.tag != '' }}
uses: actions/cache/restore@v6
with:
path: |
${{ steps.xcode.outputs.package_cache_path }}
${{ steps.xcode.outputs.source_packages_path }}
key: >-
${{ runner.os }}-${{ runner.arch }}-xcode-${{ steps.xcode.outputs.version }}-quorra-packages-${{ hashFiles('Quorra.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'Packages/QuorraCore/Package.swift') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-xcode-${{ steps.xcode.outputs.version }}-quorra-packages-

- name: Import distribution signing assets
if: ${{ steps.release-context.outputs.tag != '' }}
env:
Expand Down Expand Up @@ -148,7 +168,9 @@ jobs:
- name: Archive and export application
if: ${{ steps.release-context.outputs.tag != '' }}
env:
PACKAGE_CACHE_PATH: ${{ steps.xcode.outputs.package_cache_path }}
RELEASE_VERSION: ${{ steps.release-context.outputs.version }}
SOURCE_PACKAGES_PATH: ${{ steps.xcode.outputs.source_packages_path }}
run: |
archive_path="$RUNNER_TEMP/quorra.xcarchive"
export_path="$RUNNER_TEMP/export"
Expand Down Expand Up @@ -183,7 +205,8 @@ jobs:
-scheme QuorraApp \
-configuration Release \
-destination 'generic/platform=macOS' \
-clonedSourcePackagesDirPath "$RUNNER_TEMP/SourcePackages" \
-clonedSourcePackagesDirPath "$SOURCE_PACKAGES_PATH" \
-packageCachePath "$PACKAGE_CACHE_PATH" \
-skipPackagePluginValidation \
-archivePath "$archive_path" \
QUORRA_PROVISIONING_PROFILE_SPECIFIER="$PROVISIONING_PROFILE_UUID" \
Expand All @@ -199,6 +222,17 @@ jobs:

echo "EXPORTED_APP_PATH=$export_path/quorra.app" >> "$GITHUB_ENV"

- name: Save Swift package cache
if: >-
${{ steps.release-context.outputs.tag != '' && steps.swift-package-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v6
with:
path: |
${{ steps.xcode.outputs.package_cache_path }}
${{ steps.xcode.outputs.source_packages_path }}
key: >-
${{ runner.os }}-${{ runner.arch }}-xcode-${{ steps.xcode.outputs.version }}-quorra-packages-${{ hashFiles('Quorra.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'Packages/QuorraCore/Package.swift') }}

- name: Verify packaged application version
if: ${{ steps.release-context.outputs.tag != '' }}
env:
Expand Down Expand Up @@ -328,10 +362,11 @@ jobs:
if: ${{ steps.release-context.outputs.tag != '' }}
env:
RELEASE_TAG: ${{ steps.release-context.outputs.tag }}
SOURCE_PACKAGES_PATH: ${{ steps.xcode.outputs.source_packages_path }}
SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY }}
run: |
updates_directory="$RUNNER_TEMP/sparkle-updates"
generate_appcast="$RUNNER_TEMP/SourcePackages/artifacts/sparkle/Sparkle/bin/generate_appcast"
generate_appcast="$SOURCE_PACKAGES_PATH/artifacts/sparkle/Sparkle/bin/generate_appcast"
release_url="https://github.com/$GITHUB_REPOSITORY/releases/tag/$RELEASE_TAG"
download_url_prefix="https://github.com/$GITHUB_REPOSITORY/releases/download/$RELEASE_TAG/"

Expand Down
35 changes: 26 additions & 9 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,27 @@ jobs:
echo "source_packages_path=$RUNNER_TEMP/quorra-source-packages" >> "$GITHUB_OUTPUT"
echo "version=$(xcodebuild -version | awk '/^Xcode / { print $2 }')" >> "$GITHUB_OUTPUT"

- name: Restore Xcode build cache
id: xcode-cache
- name: Restore Swift package cache
id: swift-package-cache
uses: actions/cache/restore@v6
with:
path: |
${{ steps.xcode.outputs.derived_data_path }}
${{ steps.xcode.outputs.package_cache_path }}
${{ steps.xcode.outputs.source_packages_path }}
key: >-
${{ runner.os }}-${{ runner.arch }}-xcode-${{ steps.xcode.outputs.version }}-quorra-${{ hashFiles('Quorra.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'Quorra.xcodeproj/project.pbxproj', 'Packages/QuorraCore/Package.swift') }}
${{ runner.os }}-${{ runner.arch }}-xcode-${{ steps.xcode.outputs.version }}-quorra-packages-${{ hashFiles('Quorra.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'Packages/QuorraCore/Package.swift') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-xcode-${{ steps.xcode.outputs.version }}-quorra-
${{ runner.os }}-${{ runner.arch }}-xcode-${{ steps.xcode.outputs.version }}-quorra-packages-

- name: Restore validation build cache
id: validation-build-cache
uses: actions/cache/restore@v6
with:
path: ${{ steps.xcode.outputs.derived_data_path }}
key: >-
${{ runner.os }}-${{ runner.arch }}-xcode-${{ steps.xcode.outputs.version }}-quorra-derived-data-${{ hashFiles('Quorra.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'Quorra.xcodeproj/project.pbxproj', 'Packages/QuorraCore/Package.swift') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-xcode-${{ steps.xcode.outputs.version }}-quorra-derived-data-

- name: Build and test
env:
Expand All @@ -98,17 +107,25 @@ jobs:
-resultBundlePath "$RUNNER_TEMP/quorra-tests.xcresult"
CODE_SIGNING_ALLOWED=NO

- name: Save Xcode build cache
- name: Save Swift package cache
if: >-
${{ success() && github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.xcode-cache.outputs.cache-hit != 'true' }}
${{ success() && github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.swift-package-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v6
with:
path: |
${{ steps.xcode.outputs.derived_data_path }}
${{ steps.xcode.outputs.package_cache_path }}
${{ steps.xcode.outputs.source_packages_path }}
key: >-
${{ runner.os }}-${{ runner.arch }}-xcode-${{ steps.xcode.outputs.version }}-quorra-${{ hashFiles('Quorra.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'Quorra.xcodeproj/project.pbxproj', 'Packages/QuorraCore/Package.swift') }}
${{ runner.os }}-${{ runner.arch }}-xcode-${{ steps.xcode.outputs.version }}-quorra-packages-${{ hashFiles('Quorra.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'Packages/QuorraCore/Package.swift') }}

- name: Save validation build cache
if: >-
${{ success() && github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.validation-build-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v6
with:
path: ${{ steps.xcode.outputs.derived_data_path }}
key: >-
${{ runner.os }}-${{ runner.arch }}-xcode-${{ steps.xcode.outputs.version }}-quorra-derived-data-${{ hashFiles('Quorra.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'Quorra.xcodeproj/project.pbxproj', 'Packages/QuorraCore/Package.swift') }}

- name: Upload test results
if: ${{ failure() }}
Expand Down