Builder for Swift projects that support WebAssembly
ActionsWarning
Deprecated: This Action is no longer necessary. Please use swiftwasm/setup-swiftwasm and carton version 1.0.0 or later.
See pointfreeco/swift-custom-dump#113 as an example of migration
This action builds your project with the SwiftWasm toolchain and SDK, and has carton
and its WebAssembly dependencies preinstalled.
Optional The shell command to run on your project. Default is carton test
.
name: Build and test with SwiftWasm
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
swiftwasm_build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: swiftwasm/[email protected]
with:
shell-action: carton test
GitHub Pages is an easy way to host SwiftWasm apps. Follow the GitHub Pages guide, and then use an appropriate action after running carton bundle
to publish the results:
name: Deploy to GitHub Pages
on:
push:
branches: [main]
jobs:
swiftwasm_deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: swiftwasm/[email protected]
with:
shell-action: carton bundle
- uses: actions/upload-pages-artifact@v1
with:
path: ./Bundle
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- id: deployment
uses: actions/deploy-pages@v2
Builder for Swift projects that support WebAssembly is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.