Skip to content
activity

GitHub Action

Setup Firebase

v1.0.0 Pre-release

Setup Firebase

activity

Setup Firebase

Setup the firebase-tools in this workflow step

Installation

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

              

- name: Setup Firebase

uses: w9jds/setup-firebase@v1.0.0

Learn more about this action in w9jds/setup-firebase

Choose a version

setup-firebase (Alternative for firebase-action)

This action provides the following functionality for GitHub Actions:

  • Install firebase-tools CLI for use inside the current job
  • Specify which version of the CLI to install
  • Allows you to configure authentication and project
  • Allows you to customize your environment for what you need
    • Specific Node version (via actions/setup-node)
    • Java if needed and specified version (via actions/setup-java)

Usage

Important: For this action to work properly actions/setup-node needs to be used

See action.yml

Basic example:

steps:
  - uses: actions/checkout@master
  - uses: actions/setup-node@v3
  - uses: w9jds/setup-firebase@main
    with:
      tools-version: 11.9.0
      firebase_token: ${{ secrets.FIREBASE_TOKEN }}
  - run: firebase deploy --only hosting
  - run: firebase deploy --only functions

The tools-version is optional. If not supplied it will install the latest version of firebase-tools.

With some of the major versions removing and changing functionality, it is highly recommended you specify which version you want to use and upgrade as you need it.

Emulator example:

steps:
  - uses: actions/checkout@master
  - uses: actions/setup-node@v3
    with:
      node-version: 18
  - uses: actions/setup-java@v3
    with:
      java-version: 17
  - uses: w9jds/setup-firebase@main
    with:
      tools-version: 11.9.0
      firebase_token: ${{ secrets.FIREBASE_TOKEN }}
  - run: firebase deploy --only hosting
  - run: firebase deploy --only functions

License

The scripts and documents in this project are released under the MIT License