Skip to content

Create Release Artifacts #48

Create Release Artifacts

Create Release Artifacts #48

name: Create Release Artifacts
on:
release:
types: [published]
permissions:
contents: write
jobs:
build-xcframework:
strategy:
matrix:
target: [JBird, JBirdCore, JBirdBuilders]
name: Build XCFramework (${{ matrix.target }})
runs-on: macos-26
outputs:
artifact-name: ${{ matrix.target }}.xcframework.zip
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Xcode Version
run: ./.scripts/xcode-select
- name: Build XCFramework
run: ./.scripts/build-xcframework ${{ matrix.target }}
- name: Upload XCFramework
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}.xcframework.zip
path: Products/${{ matrix.target }}.xcframework.zip
attach-xcframework:
name: Attach XCFramework (${{ matrix.target }})
needs: build-xcframework
strategy:
matrix:
target: [JBird, JBirdCore, JBirdBuilders]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download XCFramework
uses: actions/download-artifact@v4
with:
name: ${{ matrix.target }}.xcframework.zip
path: .
- name: Attach XCFramework to Release
uses: softprops/action-gh-release@v1
with:
files: ./${{ matrix.target }}.xcframework.zip
build-docc-archive:
name: Build DocC Archive
runs-on: macos-26
outputs:
artifact-name: archive
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Xcode Version
run: ./.scripts/xcode-select
- name: Build Documentation
run: swift package generate-documentation --enable-experimental-combined-documentation --product JBird --product JBirdCore --product JBirdBuilders --product JBirdMacros
- name: Locate DocC Archive
run: cd .build/plugins/Swift-DocC/outputs
- name: Compress DocC Archive
run: |
cd .build/plugins/Swift-DocC/outputs
zip -r JBird.doccarchive.zip JBird.doccarchive
- name: Upload Documentation
uses: actions/upload-artifact@v4
with:
name: archive
path: .build/plugins/Swift-DocC/outputs/JBird.doccarchive.zip
attach-docc-archive:
name: Attach DocC Archive to Release
needs: build-docc-archive
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download DocC Archive
uses: actions/download-artifact@v4
with:
name: archive
path: .
- name: Attach DocC Archive to Release
uses: softprops/action-gh-release@v1
with:
files: ./JBird.doccarchive.zip