forked from invertase/react-native-firebase
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.62 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: 'main'
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Yarn Install
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: yarn --no-audit --prefer-offline
- name: GIT Setup
run: |
git config --global user.name '@Salakar'
git config --global user.email '[email protected]'
git remote set-url origin [email protected]:$GITHUB_REPOSITORY
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Publish Packages
run: |
yarn logout
echo "@react-native-firebase:registry=https://registry.npmjs.org/" > ~/.npmrc
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm whoami
git diff --exit-code
yarn lerna changed
yarn lerna version --yes --force-publish=*
yarn lerna publish from-package --yes
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}