Skip to content
box

GitHub Action

Setup protoc

v3.0.0 Latest version

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/setup-protoc@v3.0.0

Learn more about this action in arduino/setup-protoc

Choose a version

setup-protoc

Check npm Dependencies status test Sync Labels status Check Markdown status Check License status Check Taskfiles status Integration Tests status Check npm status Check TypeScript status Check tsconfig status Check Packaging status

This action makes the protoc compiler available to Workflows.

Upgrade from v1 to v2 or v3

Added support only for the new protobuf tag naming convention MINOR.PATCH.

Usage

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

- name: Install Protoc
  uses: arduino/setup-protoc@v3

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

- name: Install Protoc
  uses: arduino/setup-protoc@v3
  with:
    version: "23.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/setup-protoc@v3
  with:
    version: "23.x"
    include-pre-releases: true

To pin the exact version:

- name: Install Protoc
  uses: arduino/setup-protoc@v3
  with:
    version: "23.2"

The action queries the GitHub API to fetch releases data, to avoid rate limiting, pass the default token with the repo-token variable:

- name: Install Protoc
  uses: arduino/setup-protoc@v3
  with:
    repo-token: ${{ secrets.GITHUB_TOKEN }}

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.

Security

If you think you found a vulnerability or other security-related bug in this project, please read our security policy and report the bug to our Security Team 🛡️ Thank you!

e-mail contact: security@arduino.cc

Contributing

To report bugs or make feature requests, please submit an issue: https://github.com/arduino/setup-protoc/issues

Pull requests are welcome! Please see the contribution guidelines for information.