/setup-tinygo

GitHub action to setup a TinyGo environment

Primary LanguageTypeScriptMIT LicenseMIT

setup-tinygo

Check dist/ Validate

This actions sets up a TinyGo environment for GitHub Actions.

Usage

Basic

steps:
  - uses: actions/checkout@v2
  - uses: Integralist/setup-tinygo@v1.0.0
    with:
      tinygo-version: 0.20.0

With matrix expansion

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        tinygo: ['0.19.0', '0.20.0']
    name: TinyGo ${{ matrix.tinygo }}
    steps:
      - uses: actions/checkout@v2
      - uses: Integralist/setup-tinygo@v1.0.0
        with:
          tinygo-version: ${{ matrix.tinygo }}

With custom Go version

TinyGo needs Go and, by default, this action will use whatever version is available in the runner. If you want to control the Go version, you can use actions/setup-go before integralist/setup-tinygo

steps:
  - uses: actions/checkout@v2
  - uses: actions/setup-go@v2
    with:
      go-version: 1.17
  - uses: Integralist/setup-tinygo@v1.0.0
    with:
      tinygo-version: 0.20.0

Why?

This is a fork of https://github.com/acifani/setup-tinygo and the reason for forking was to add support for binaryen. I had opened an issue (here) but it received no response of any kind and I wasn't in a position to wait around so I decided I'd fork and implement the necessary changes myself.