|
4 | 4 | release: |
5 | 5 | types: [published] |
6 | 6 | workflow_dispatch: # Manual trigger |
7 | | - push: # temporal, letting GH know this exist |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - amanowicz/KG-682_spm_support |
8 | 10 |
|
9 | 11 | jobs: |
10 | 12 | build-xcframework: |
@@ -54,27 +56,34 @@ jobs: |
54 | 56 | ./gradlew :koog-agents:assembleXCFramework --no-daemon --stacktrace |
55 | 57 | echo "XCFramework binary assembled" |
56 | 58 |
|
57 | | - - name: Create XCFramework zip |
58 | | - run: | |
59 | | - cd koog-agents/build/XCFrameworks/release |
60 | | - zip -r koog_agents-${{ steps.version.outputs.version }}.xcframework.zip koog_agents.xcframework |
61 | | - echo "XCFramework zip created:" |
62 | | - ls -lh koog_agents-${{ steps.version.outputs.version }}.xcframework.zip |
63 | | - # Calculate checksum for SPM |
64 | | - shasum -a 256 koog_agents-${{ steps.version.outputs.version }}.xcframework.zip |
65 | | -
|
66 | | - - name: Upload XCFramework artifact |
| 59 | + # Uploading XCF binary on manual runs without polluting the release - for debugging & testing |
| 60 | + # Note that 'actions/upload-artifact@v4' always zips the artifact, so we don't have to do it for manual runs |
| 61 | + - name: Upload XCFramework artifact for manual runs |
| 62 | + # disable for branch test |
| 63 | + #if: github.event_name == 'workflow_dispatch' |
67 | 64 | uses: actions/upload-artifact@v4 |
68 | 65 | with: |
69 | 66 | name: koog-agents-xcframework-${{ steps.version.outputs.version }} |
70 | | - path: koog-agents/build/XCFrameworks/release/koog_agents-${{ steps.version.outputs.version }}.xcframework.zip |
| 67 | + path: koog-agents/build/XCFrameworks/release/ |
71 | 68 | retention-days: 30 |
72 | 69 |
|
73 | | - - name: Upload to release |
74 | | - if: false # Temporarily disabled |
75 | | - #if: github.event_name == 'release' |
| 70 | + - name: Create XCFramework zip for release |
| 71 | + if: github.event_name == 'release' |
| 72 | + id: archive |
| 73 | + run: | |
| 74 | + ARCHIVE_NAME="koog_agents-${{ steps.version.outputs.version }}.xcframework.zip" |
| 75 | + cd koog-agents/build/XCFrameworks/release |
| 76 | + zip -r "$ARCHIVE_NAME" koog_agents.xcframework |
| 77 | + echo "archive_path=$(pwd)/$ARCHIVE_NAME" >> $GITHUB_OUTPUT |
| 78 | + echo "XCFramework zip created:" |
| 79 | + ls -lh "$ARCHIVE_NAME" |
| 80 | + # Calculate checksum for SPM |
| 81 | + shasum -a 256 "$ARCHIVE_NAME" |
| 82 | +
|
| 83 | + - name: Upload XCFramework artifact to release |
| 84 | + if: github.event_name == 'release' |
76 | 85 | uses: softprops/action-gh-release@v2 |
77 | 86 | with: |
78 | | - files: koog-agents/build/XCFrameworks/release/koog_agents-${{ steps.version.outputs.version }}.xcframework.zip |
| 87 | + files: ${{ steps.archive.outputs.archive_path }} |
79 | 88 | env: |
80 | 89 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments