Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
box

GitHub Action

Setup protoc

v1.1.0

Setup protoc

box

Setup protoc

Download protoc compiler and add it to the PATH

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Setup protoc

uses: arduino/[email protected]

Learn more about this action in arduino/setup-protoc

Choose a version

setup-protoc

This action makes the protoc compiler available to Workflows.

Usage

To get the latest stable version of protoc just add this step:

- name: Install Protoc
  uses: Arduino/actions/setup-protoc@master

If you want to pin a major or minor version you can use the .x wildcard:

- name: Install Protoc
  uses: Arduino/actions/setup-protoc@master
  with:
    version: '3.x'

You can also require to include releases marked as pre-release in Github using the include-pre-releases flag (the dafault value for this flag is false)

- name: Install Protoc
  uses: Arduino/actions/setup-protoc@master
  with:
    version: '3.x'
    include-pre-releases: true

To pin the exact version:

- name: Install Protoc
  uses: Arduino/actions/setup-protoc@master
  with:
    version: '3.9.1'

Development

To work on the codebase you have to install all the dependencies:

# npm install

To run the tests:

# npm run test

Enable verbose logging for a pipeline

Additional log events with the prefix ::debug:: can be enabled by setting the secret ACTIONS_STEP_DEBUG to true.

See step-debug-logs for reference.

Release

We check in the node_modules to provide runtime dependencies to the system using the Action, so be careful not to git add all the development dependencies you might have under your local node_modules. To release a new version of the Action the workflow should be the following:

  1. npm install to add all the dependencies, included development.
  2. npm run test to see everything works as expected.
  3. npm run build to build the Action under the ./lib folder.
  4. rm -rf node_modules to remove all the dependencies.
  5. npm install --production to add back only the runtime dependencies.
  6. git add lib node_modules to check in the code that matters.
  7. open a PR and request a review.