Skip to content

Commit

Permalink
Extract prepare release into a separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoy committed Dec 12, 2023
1 parent 1194af6 commit 44ce639
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/bump_internal_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}

0 comments on commit 44ce639

Please sign in to comment.