fix(firestore, bytes): return Bytes for modular API usage, fix deprec… #1563
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
publish_npm: | |
if: "(github.repository == 'invertase/react-native-firebase') && (github.event_name == 'workflow_dispatch')" | |
name: 'NPM' | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'main' | |
fetch-depth: 0 | |
# Repository admin required to evade PR+checks branch protection | |
token: ${{ secrets.GH_TOKEN }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Yarn Install | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 15 | |
retry_wait_seconds: 60 | |
max_attempts: 3 | |
command: yarn && yarn lerna:prepare | |
- name: GIT Setup | |
# Alter branding of release commit, despite GITHUB_TOKEN having real owner | |
run: | | |
git config --global user.name 'Invertase Publisher' | |
git config --global user.email '[email protected]' | |
- name: Publish Packages | |
# for lerna, you must write the token out to .npmrc like this | |
run: | | |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc | |
git diff --exit-code | |
yarn lerna changed | |
yarn lerna version --yes --force-publish=* | |
yarn lerna publish from-package --yes | |
env: | |
# new style token w/scope for `@react-native-firebase` required | |
# to work with npmjs.com 2FA-or-automation-token package requirement | |
NPM_TOKEN: ${{ secrets.MIKEHARDY_NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |