-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract prepare release into a separate job
- Loading branch information
Showing
1 changed file
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,24 @@ jobs: | |
with: | ||
submodules: recursive | ||
|
||
- name: Set cache key hash | ||
run: | | ||
has_only_tags=$(jq '[ .pins[].state | has("version") ] | all' DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved) | ||
if [[ "$has_only_tags" == "true" ]]; then | ||
echo "cache_key_hash=${{ hashFiles('DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}" >> $GITHUB_ENV | ||
else | ||
echo "Package.resolved contains dependencies specified by branch or commit, skipping cache." | ||
fi | ||
- name: Cache SPM | ||
if: env.cache_key_hash | ||
uses: actions/cache@v3 | ||
with: | ||
path: DerivedData/SourcePackages | ||
key: ${{ runner.os }}-spm-Non-Sandbox-${{ env.cache_key_hash }} | ||
restore-keys: | | ||
${{ runner.os }}-spm-Non-Sandbox | ||
- name: Select Xcode | ||
run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer | ||
|
||
|
@@ -51,7 +69,8 @@ jobs: | |
git config --global user.email "[email protected]" | ||
bundle exec fastlane bump_internal_release | ||
- name: Prepare new release | ||
uses: ./.github/workflows/release.yml | ||
with: | ||
asana-task-url: ${{ github.event.inputs.asana-task-url }} | ||
prepare_release: | ||
needs: increment_build_number | ||
uses: ./.github/workflows/release.yml | ||
with: | ||
asana-task-url: ${{ github.event.inputs.asana-task-url }} |