Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.
/ swiftwasm-action Public archive

GitHub Action with SwiftWasm toolchain and SDK preinstalled

License

Notifications You must be signed in to change notification settings

swiftwasm/swiftwasm-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning

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

SwiftWasm GitHub Action

This action builds your project with the SwiftWasm toolchain and SDK, and has carton and its WebAssembly dependencies preinstalled.

Inputs

shell-action

Optional The shell command to run on your project. Default is carton test.

Example usage

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/swiftwasm-action@v5.9
        with:
          shell-action: carton test

Usage with GitHub Pages

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/swiftwasm-action@v5.9
        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

About

GitHub Action with SwiftWasm toolchain and SDK preinstalled

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

  •  
  •  

Packages

No packages published

Contributors 3

  •  
  •  
  •