Skip to content

GitHub action to setup a TinyGo environment

License

Notifications You must be signed in to change notification settings

acifani/setup-tinygo

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

47b7d36 · Jan 10, 2025

History

25 Commits
Jan 10, 2025
Oct 27, 2023
Mar 30, 2023
Sep 12, 2022
Sep 12, 2022
Nov 4, 2021
Nov 4, 2021
Oct 27, 2023
Oct 27, 2023
Nov 4, 2021
Oct 27, 2023
Oct 27, 2023
Mar 30, 2023
Sep 12, 2022
Oct 27, 2023

Repository files navigation

setup-tinygo

Check dist/ Validate

This actions sets up a TinyGo environment for GitHub Actions.

Usage

Basic

steps:
  - uses: actions/checkout@v2
  - uses: acifani/setup-tinygo@v2
    with:
      tinygo-version: '0.30.0'

With matrix expansion

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        tinygo: ['0.29.0', '0.30.0']
    name: TinyGo ${{ matrix.tinygo }}
    steps:
      - uses: actions/checkout@v2
      - uses: acifani/setup-tinygo@v2
        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 acifani/setup-tinygo

steps:
  - uses: actions/checkout@v2
  - uses: actions/setup-go@v2
    with:
      go-version: 1.21
  - uses: acifani/setup-tinygo@v2
    with:
      tinygo-version: '0.30.0'

With custom Binaryen version

This action will install Binaryen which is needed for building WASM on Windows and MacOS. You can customize the version with the dedicated input value

steps:
  - uses: actions/checkout@v2
  - uses: acifani/setup-tinygo@v2
    with:
      tinygo-version: '0.30.0'
      binaryen-version: '116'

Without Binaryen

If you don't need Binaryen, you can omit the installation

steps:
  - uses: actions/checkout@v2
  - uses: acifani/setup-tinygo@v2
    with:
      tinygo-version: '0.30.0'
      install-binaryen: 'false'