Skip to content

Latest commit

 

History

History

workflows

README.md

r-wasm/actions Reusable workflows

This directory contains reusable workflows for use in other repositories. Workflows are stored in the .github/workflows directory of this repository, and can be used in other repositories by referencing the workflow file in the uses field of a workflow step.

Workflows whose name starts with an _ are for internal use only and should not be used by other repositories.

Reusable workflows

Builds a CRAN-like repository for R WebAssembly and deploys the repo to GitHub Pages (in beta).

Great for groups and organizations using a meta GitHub repo to create a centralized R WebAssembly CRAN-like repository. Similar to CRAN, only the latest published repository version will persist.

Steps

  1. Checkout the GitHub repository
  2. Build the repository with r-wasm/actions/build-cran-repo
  3. Deploy the repository to GitHub pages with actions/upload-pages-artifact

Inputs

  • packages ('packages') - A string of R package references. If an empty value is provided (default), the workflow will read ./packages file for the R package references.

Usage

To leverage this reusable workflow, run the following R command in the root of your GitHub repository:

usethis::use_github_action(
  url = "https://raw.githubusercontent.com/r-wasm/actions/v3/examples/deploy-cran-repo.yml"
)

Builds a WebAssembly file image and adds the files to a GitHub release.

This is typically used within R packages to build and release a WebAssembly R package library image of your package and its dependencies. Because the assets are tied to a release, they will never be overwritten are are stable over time.

Steps

  1. Checkout the GitHub repository
  2. Build the library image with r-wasm/actions/build-cran-repo
  3. Add the library image to the release with svenstaro/upload-release-action

Inputs

  • packages ('.') - A string of R package references. In addition to packages value, any R packages listed in Config/Needs/wasm in the DESCRIPTION file will automatically be added to the list.
  • strip (NULL) - An R expression evaluating to a character vector of directories to remove when building the WebAssembly R package library image. To achieve a smaller bundle size, it is recommended to set strip to "demo, doc, examples, help, html, include, tests, vignette".

Usage

To leverage this reusable workflow, run the following R command in the root of your GitHub repository:

usethis::use_github_action(
  url = "https://raw.githubusercontent.com/r-wasm/actions/v3/examples/release-file-system-image.yml"
)