Skip to content

Commit c516529

Browse files
authored
Update detect-api-changes.yml
1 parent baabfce commit c516529

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/detect-api-changes.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,20 @@ jobs:
5454
target: '${{ github.event.inputs.old || github.event.pull_request.base.ref }}'
5555
githubRepo: '${{github.server_url}}/${{github.repository}}.git'
5656
noTargetBranch: 'no target branch'
57-
57+
58+
- name: 🧰 Build Swift CLI
59+
run: swift build --configuration release
60+
5861
- name: 🏃 Run Diff
5962
run: |
60-
NEW=${{ inputs.new }}
61-
OLD=${{ inputs.old }}
63+
NEW=${{ env.NEW_VERSION }}
64+
OLD=${{ env.OLD_VERSION }}
6265
PLATFORM=${{ inputs.platform }}
6366
PROJECT_FOLDER=${{ github.workspace }}
64-
65-
swift run public-api-diff project --new "$NEW" --old "$OLD" --platform "$PLATFORM" --output "$PROJECT_FOLDER/api_comparison.md" --log-output "$PROJECT_FOLDER/logs.txt"
67+
BINARY_PATH=$(swift build --configuration release --show-bin-path)/public-api-diff"
68+
69+
echo "▶️ Running binary at $BINARY_PATH"
70+
$BINARY_PATH project --new "$NEW" --old "$OLD" --platform "$PLATFORM" --output "$PROJECT_FOLDER/api_comparison.md" --log-output "$PROJECT_FOLDER/logs.txt"
6671
cat "$PROJECT_FOLDER/logs.txt"
6772
6873
if [[ ${{ env.HEAD_GITHUB_REPO != env.BASE_GITHUB_REPO }} ]]; then
@@ -74,7 +79,6 @@ jobs:
7479
fi
7580
7681
cat "$PROJECT_FOLDER/api_comparison.md" >> $GITHUB_STEP_SUMMARY
77-
shell: bash
7882
7983
# We only want to comment if we're in a Pull Request and if the Pull Request is not from a forked Repository
8084
# Forked Repositories have different rights for security reasons and thus it's not possible to comment on PRs without lowering the security

0 commit comments

Comments
 (0)