Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

A GitHub action for setting version environment variables for supported moon tools.

Notifications You must be signed in to change notification settings

moonrepo/tool-version-action

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

Repository files navigation

moon - Automatic tool versioning (DEPRECATED)

This action is deprecated and will be removed in the future. moon >= 1.14 supports partial versions, and overriding versions with environment variables. Learn more: https://moonrepo.dev/docs/guides/open-source

Since moon requires fully-qualified semantic versions for tools in its toolchain, this action will automatically determine valid versions based on a partial version. For example, 14 will resolve to 14.10.12.

It achieves this by resolving an input against the tool's official manifest (or GitHub's manifest) to determine a valid semantic version. Once resolved, it will set moon specific environment variables for subsequent steps.

Installation

# ...
jobs:
  ci:
    name: CI
    runs-on: ubuntu-latest
    steps:
      - uses: moonrepo/tool-version-action@v1
        with:
          node: 16
      - run: moon ci

Multiple versions can be supported through GitHub actions matrix.

# ...
jobs:
  ci:
    name: CI
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [14, 16, 18]
    steps:
      - uses: moonrepo/tool-version-action@v1
        with:
          node: ${{ matrix.node-version }}
      - run: moon ci

Inputs

  • node - The Node.js version to resolve. Will set a MOON_NODE_VERSION environment variable.

Testing

This action can be tested locally by defining an environment variable for the input you'd like test, and running the test:input script. For example, if you'd like to test Node.js:

INPUT_NODE=16 npm run test:input

About

A GitHub action for setting version environment variables for supported moon tools.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published