CD.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. name: "SDWebImage CD"
  2. on:
  3. push:
  4. # Pattern matched against refs/tags
  5. tags:
  6. - '*'
  7. pull_request:
  8. branches:
  9. - '*'
  10. jobs:
  11. Release:
  12. name: Release XCFramework
  13. runs-on: macos-15
  14. env:
  15. LC_ALL: en_US.UTF-8
  16. CODESIGN_KEY_BASE64: "${{ secrets.CODESIGN_KEY_BASE64 }}"
  17. DEVELOPER_DIR: /Applications/Xcode_16.0.app
  18. XCODE_VERSION_MAJOR: 1600
  19. XCODE_VERSION_MINOR: 1600
  20. strategy:
  21. fail-fast: true
  22. matrix:
  23. linkage: [dynamic, static]
  24. include:
  25. - linkage: dynamic
  26. MACH_O_TYPE: mh_dylib
  27. - linkage: static
  28. MACH_O_TYPE: staticlib
  29. steps:
  30. - name: Checkout
  31. uses: actions/checkout@v3
  32. - name: Build XCFramework
  33. run: |
  34. set -o pipefail
  35. set -x
  36. export MACH_O_TYPE="${{ matrix.MACH_O_TYPE }}"
  37. ./Scripts/build-frameworks.sh
  38. rm -rf ~/Library/Developer/Xcode/DerivedData/
  39. - name: Create XCFramework
  40. run: |
  41. set -o pipefail
  42. set -x
  43. export MACH_O_TYPE="${{ matrix.MACH_O_TYPE }}"
  44. ./Scripts/create-xcframework.sh
  45. ./Scripts/sign-xcframework.sh
  46. - name: Archive XCFramework
  47. run: |
  48. cd build
  49. zip -r -y SDWebImage-${{ matrix.linkage }}.xcframework.zip SDWebImage.xcframework
  50. cd ../
  51. mv build/SDWebImage-${{ matrix.linkage }}.xcframework.zip SDWebImage-${{ matrix.linkage }}.xcframework.zip
  52. rm -rf build
  53. - uses: softprops/action-gh-release@v0.1.15
  54. env:
  55. GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
  56. GITHUB_REPOSITORY: "${{ github.repository }}"
  57. with:
  58. files: "SDWebImage-${{ matrix.linkage }}.xcframework.zip"
  59. tag_name: 5.20.1