Upgrade CI Swift toolchain to 6.2.4 to match WASM SDK #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Docs + WASM | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'Sources/**' | |
| - 'Docs/**' | |
| - 'DocsHost/**' | |
| - '.github/workflows/deploy-docs-wasm.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Swift 6.2.4 | |
| run: | | |
| SWIFT_VERSION="swift-6.2.4-RELEASE" | |
| curl -sL "https://download.swift.org/swift-6.2.4-release/ubuntu2404/${SWIFT_VERSION}/${SWIFT_VERSION}-ubuntu24.04.tar.gz" -o swift.tar.gz | |
| sudo tar xzf swift.tar.gz -C /opt | |
| echo "/opt/${SWIFT_VERSION}-ubuntu24.04/usr/bin" >> $GITHUB_PATH | |
| - name: Install WASM SDK | |
| run: swift sdk install https://download.swift.org/swift-6.2.4-release/wasm-sdk/swift-6.2.4-RELEASE/swift-6.2.4-RELEASE_wasm.artifactbundle.tar.gz --checksum 32fdb8772d73bb174f77b5c59bc88a0d55003d75712832129394d3465158fb43 | |
| - name: Build SkiaUIDocsSite for WASM | |
| run: swift package --swift-sdk wasm32-unknown-wasip1 js -c release | |
| - name: Assemble site | |
| run: | | |
| mkdir -p _site | |
| cp -r Docs/* _site/ | |
| mkdir -p _site/demos | |
| cp DocsHost/index.html _site/demos/ | |
| cp DocsHost/displayListPlayer.mjs _site/demos/ | |
| cp -r .build/plugins/PackageToJS/outputs/Package _site/demos/package | |
| touch _site/.nojekyll | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |