@@ -83,38 +83,54 @@ jobs:
83
83
echo "version=v${{ github.run_number }}" >> $GITHUB_OUTPUT
84
84
fi
85
85
86
- - name : Create Release
87
- id : create_release
88
- uses : softprops/action-gh-release@v1
86
+ - name : List output directory
87
+ run : |
88
+ echo "Current working directory: $(pwd)"
89
+ echo "OUTPUT_DIR: ${{ env.OUTPUT_DIR }}"
90
+ echo "Contents of OUTPUT_DIR:"
91
+ ls -la ${{ env.OUTPUT_DIR }}
92
+ echo "Full paths of .xcframework directories:"
93
+ find ${{ env.OUTPUT_DIR }} -name "*.xcframework" -type d
94
+ echo "Structure of .xcframework directories:"
95
+ find ${{ env.OUTPUT_DIR }} -name "*.xcframework" -type d -exec sh -c 'echo "{}:"; ls -R "{}"' \;
96
+
97
+ - name : Zip XCFrameworks
98
+ run : |
99
+ cd ${{ env.OUTPUT_DIR }}
100
+ for framework in *.xcframework; do
101
+ zip -r "${framework%.xcframework}.xcframework.zip" "$framework"
102
+ done
103
+ ls -la
104
+
105
+ - name : Create Release and Upload XCFrameworks
106
+ uses : softprops/action-gh-release@v2
89
107
if : github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'
90
108
with :
91
109
tag_name : ${{ steps.version.outputs.version }}
92
110
name : Release ${{ steps.version.outputs.version }}
93
111
draft : false
94
112
prerelease : false
95
113
generate_release_notes : true
96
-
97
- - name : Upload XCFrameworks to Release
98
- uses : softprops/action-gh-release@v1
99
- if : github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'
100
- with :
101
- files : ${{ env.OUTPUT_DIR }}/*.xcframework
102
- tag_name : ${{ steps.version.outputs.version }}
114
+ fail_on_unmatched_files : true
115
+ files : |
116
+ ${{ env.OUTPUT_DIR }}/*.xcframework.zip
103
117
env :
104
118
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
105
119
106
120
- name : Check Release
107
121
run : |
108
122
echo "Checking release ${{ steps.version.outputs.version }}"
109
- release_info=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
123
+ release_info=$(curl -sS - H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
110
124
https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.version.outputs.version }})
111
- echo "Release info: $release_info"
112
- assets=$(echo $release_info | jq '.assets')
113
- echo "Release assets: $assets"
125
+ echo "Release info:"
126
+ echo "$release_info" | jq '.'
127
+ assets=$(echo "$release_info" | jq -r '.assets[].name')
128
+ echo "Release assets:"
129
+ echo "$assets"
114
130
115
- - name : Upload XCFrameworks
131
+ - name : Upload XCFrameworks as Workflow Artifacts
116
132
uses : actions/upload-artifact@v4
117
133
with :
118
134
name : XCFrameworks
119
- path : ${{ env.OUTPUT_DIR }}/*.xcframework
135
+ path : ${{ env.OUTPUT_DIR }}/*.xcframework.zip
120
136
if-no-files-found : error
0 commit comments