Skip to content

moon - Automatic tool versioning

Actions
Sets MOON_VERSION environment variables for moon supported tools
v1.4.0
Latest
Star (2)

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

moon - Automatic tool versioning is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Sets MOON_VERSION environment variables for moon supported tools
v1.4.0
Latest

moon - Automatic tool versioning is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.