Skip to content

Publish npm package #86

Publish npm package

Publish npm package #86

name: Publish npm package
on:
workflow_dispatch:
inputs:
package_name:
description: "The package name to publish"
required: true
default: "@firebaseextensions/fs-bq-schema-views"
jobs:
publish_if_newer_version:
runs-on: ubuntu-latest
name: publish_if_newer_version
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: NPM install
run: npm install
- name: Publish BigQuery Schema Views
if:
${{ github.event.inputs.package_name ==
'@firebaseextensions/fs-bq-schema-views'}}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_BQ_SCHEMA_VIEWS }}
run: |
cd firestore-bigquery-export/scripts/gen-schema-view
${{ github.workspace }}/.github/workflows/scripts/npm_publish.sh
- name: Publish BigQuery Import Collection
if:
${{ github.event.inputs.package_name ==
'@firebaseextensions/fs-bq-import-collection'}}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_BQ_IMPORT_COLLECTION }}
run: |
cd firestore-bigquery-export/scripts/import
${{ github.workspace }}/.github/workflows/scripts/npm_publish.sh
- name: Publish BigQuery Change Tracker
if:
${{ github.event.inputs.package_name ==
'@firebaseextensions/firestore-bigquery-change-tracker'}}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_BQ_CHANGE_TRACKER }}
run: |
cd firestore-bigquery-export/firestore-bigquery-change-tracker
${{ github.workspace }}/.github/workflows/scripts/npm_publish.sh